dylan-hackers / mindy

Mindy - minimal compiler-interpreter for Dylan
Other
21 stars 9 forks source link

event loop #65

Open waywardmonkeys opened 8 years ago

waywardmonkeys commented 8 years ago

We currently have parts of an event loop in the C code within the interpreter. But we aren't using any modern mechanisms ... and it isn't providing support for doing stuff from the Dylan level.

What can we improve here?

Can we learn something from the Haskell MIO library?

kaveman- commented 8 years ago

libuv? there is also the eventloop from redis (ae.c) that could be used. But first, wouldn't it be better to gather the interpreter globals into a state object?

pierredepascale commented 8 years ago

From what I remember all the interpreter state is already encapsulated in a thread_t structure containing the PC, SP, etc...

waywardmonkeys commented 8 years ago

Yes, but those then share the same heap and loaded code. There are things where having entirely separate VMs in a single process would be useful (but a fair bit of work).