pmmp / ext-pmmpthread

Fork of https://github.com/krakjoe/pthreads with a revamped API and PHP 8.1+ support
Other
82 stars 15 forks source link

Thread autoload bootstrap #110

Open dktapps opened 1 year ago

dktapps commented 1 year ago

This is a duplicate of #23, which was closed by the deletion of the fork-ng branch and can't be reopened due to github.

Upon further musings, I think it would make sense to allow adding multiple files for this. In essence, this function allows the developer to say "require this file before running any thread code". Perhaps addAutoloadFile() instead of setAutoloadFile().

dktapps commented 9 months ago

In conjunction with Thread::getSharedGlobals(), this could become a powerful tool for thread bootstrapping