Real multi-threading #2

otevřený
otevřeno před 5 roky uživatelem MightyPork · 0 komentářů
Vlastník

Add a module that implements real multi-threading.

A thread would be called like a routine, and work as a stand-alone process until calling (ret) from the top level. Spawning a thread would create a handle. The caller can then wait for the return values using (join @handle).

Everything is easy and straightforward, except how to deal with objects passing into the thread as arguments.

  • Just do nothing and disallow handle passing between threads. This will suck but may be good enough for an initial implementation.
  • Referenced objects can be moved into the thread's extension store. This requires some cooperation from extensions.
  • The whole extension store can be cloned. Maybe. This sounds like a bad way to do it.
  • Put extension data in an Arc Mutex and share it with threads. rip performance
Add a module that implements real multi-threading. A thread would be called like a routine, and work as a stand-alone process until calling `(ret)` from the top level. Spawning a thread would create a handle. The caller can then wait for the return values using `(join @handle)`. Everything is easy and straightforward, except how to deal with objects passing into the thread as arguments. - Just do nothing and disallow handle passing between threads. This will suck but may be good enough for an initial implementation. - Referenced objects can be moved into the thread's extension store. This requires some cooperation from extensions. - The whole extension store can be cloned. Maybe. This sounds like a bad way to do it. - Put extension data in an Arc Mutex and share it with threads. rip performance
MightyPork změnil/a název z Multi-threading na Real multi-threading před 5 roky
MightyPork přidal/a
feature
ft-core
štítky před 5 roky
Přihlaste se pro zapojení do konverzace.
Bez milníku
Bez zpracovatelů
1 účastníků
Oznámení
Termín dokončení

Žádný termín dokončení.

Závislosti

Nejsou nastaveny žádné závislosti.

Reference: MightyPork/crsn#2
Načítá se…
Není zde žádný obsah.