Almost none of the GNUnet APIs are expected to be thread-safe. Unless
you REALLY know what you are doing (basically, know for which APIs there
is an exception!), you must call all GNUnet APIs from the same thread.

On 2/27/21 5:05 PM, Danny via Mailinglist for GNUnet developers wrote:
> Also, may I ask?
> Is there any problem with using the API functions on other threads than
> the one GNUNET_PROGRAM_run was called on?
> 
> I am having weird segfaults/stack overlow errors at seemingly random
> places. I'm calling the *_connect (and afterwards *_disconnect)
> functions, and then some API calls, all from another thread, and I'm
> worried I have somehow caused unspecified behavoir or something.
> There is still no parallelism. I was thinking that since the API calls
> simply  exchange process messages, it shouldn't matter from which
> thread I'm exchanging them. Or am I wrong here?
> 
> Anyway,
> Thanks a lot.
> Danny
> 

Reply via email to