Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
raingloom

Threading/multi-user connection?

Recommended Posts

So, I know that true parallelization is not possible with Lua's coroutines, but I thought it would be fun to implement something like a server with multiple users.

The basic idea is that the kernel runs coroutines according to priorities (just like in real life) and maybe "punishes" threads that take too long to yield (it runs them less often).

 

This is all fine and dandy, but it would also be nice to run non-blocking threads while a thread is waiting on a blocking operation (events). That's where the problems arise.

Waiting on pullSignal would blocks other theads, even with a timeout.

 

Any ideas to overcome this?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.