Hacker News new | past | comments | ask | show | jobs | submit login

Kinda. The VM executes Smalltalk on a single thread (interpreting or running JIT-compiled code). At the Smalltalk level, the unit of concurrency is called a "process". Processes are assigned priorities. Processes with higher priority preempt processes of lower priority, but processes of the same priority are cooperative.

So yes, "green threads". However, the VM does run multiple OS threads. When a Smalltalk process does IO, that gets performed on a different OS thread by the VM and the calling Smalltalk process is blocked, which lets another Smalltalk process get scheduled.

You could do that trick for things like calling ODBC or computationally expensive C code, but if you just call single-threaded C code directly, yeah, it'll block all Smalltalk processes until it returns.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: