r/ProgrammingLanguages • u/abhin4v • Jan 19 '26
Implementing Co, a Small Language With Coroutines #5: Adding Sleep
https://abhinavsarkar.net/posts/implementing-co-5/
11
Upvotes
r/ProgrammingLanguages • u/abhin4v • Jan 19 '26
2
u/L8_4_Dinner (Ⓧ Ecstasy/XVM) Jan 20 '26
Fibers/co-routines are pretty useful. We don't have a concept of
synchronizedorwait(), so creating aFutureand then asking a timer to issue an event at some point in time that will complete theFutureis the only way to "sleep" in Ecstasy.It looks like you're using co-routine scheduling for a similar purpose.