Closed Dirbaio closed 1 year ago
The fn was passed by value to set_function_pointer, and set_function_pointer was storing a ptr to its arg in state. When set_function_pointer returns, the arg is gone. Pass it by pointer instead, so it lives as long as the wait/wait_many futures.
set_function_pointer
state
wait
wait_many
Maybe fixes #175
The fn was passed by value to
set_function_pointer
, andset_function_pointer
was storing a ptr to its arg instate
. Whenset_function_pointer
returns, the arg is gone. Pass it by pointer instead, so it lives as long as thewait
/wait_many
futures.Maybe fixes #175