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
Redesign create_thread to avoid dynamic allocation. (#94)
Change `create_thread` from taking a boxed closure to taking a function
pointer, as well as an array of pointers to be copied into the new thread
to pass to the function. This avoids the need to dynamically allocate for
a `Box`, and in particular it allows c-ward's `pthread_create` to be used
from within `malloc` implementations.
And, implement thread return values, which is simpler with the removal of
`Option<Box<dyn Any>>`.
These changes do create more work for users of the API, however it also
gives them more control.
Fixes#85.
0 commit comments