You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change implemented in #437 skips worker thread creation for worker 0. This seems to be Ok, but it also leaves env->thread_ids[0] uninitialized. Consequently, we cannot use lf_thread_set_cpu or similar API functions to set affinity or priority of the main thread from LF code. In fact, code that simply loops over all threads to set their affinity segfaults on the first worker.
A fix for this bug would assign the thread id of the main thread to env->thread_ids[0]. However, it is unclear for me how to do this in a portable way.
The text was updated successfully, but these errors were encountered:
The change implemented in #437 skips worker thread creation for worker 0. This seems to be Ok, but it also leaves
env->thread_ids[0]
uninitialized. Consequently, we cannot uself_thread_set_cpu
or similar API functions to set affinity or priority of the main thread from LF code. In fact, code that simply loops over all threads to set their affinity segfaults on the first worker.A fix for this bug would assign the thread id of the main thread to
env->thread_ids[0]
. However, it is unclear for me how to do this in a portable way.The text was updated successfully, but these errors were encountered: