-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Concurrency as first-class citizen #2312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Out of Scope
This idea sits outside of the TypeScript language design constraints
Question
An issue which isn't directly actionable in code
Suggestion
An idea for TypeScript
Comments
That can mean a lot of things - you mean like #1664? |
@DanielRosenwasser I was more meaning multi-threading, to be able to spawn processes directly without requiring any library. |
@DanielRosenwasser and also have an effective way of message passing. Ala go style. package main
import "fmt"
func main() {
// Create a new channel with `make(chan val-type)`.
// Channels are typed by the values they convey.
messages := make(chan string)
// _Send_ a value into a channel using the `channel <-`
// syntax. Here we send `"ping"` to the `messages`
// channel we made above, from a new goroutine.
go func() { messages <- "ping" }()
// The `<-channel` syntax _receives_ a value from the
// channel. Here we'll receive the `"ping"` message
// we sent above and print it out.
msg := <-messages
fmt.Println(msg)
} |
This is how spider lang (a compile to JS lang) have implemented their channels http://spiderlang.org/#channels |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Out of Scope
This idea sits outside of the TypeScript language design constraints
Question
An issue which isn't directly actionable in code
Suggestion
An idea for TypeScript
I'm just interested if you got any plans of implementing concurrency to TypeScript?
The text was updated successfully, but these errors were encountered: