'In hiredis async, can event_base_dispatch(base) be called from a different thread?

This query is with respect to the example provided in hiredis

Can event_base_dispatch(base) be called from a different thread by creating pthread_create()?

It is a fact that event_base_dispatch() is a loop and it is a blocking call. My idea here is to send all my redis command from the parent thread by invoking redisAsyncCommand(), event base will be run in the other thread.



Solution 1:[1]

you need to use add enable_thread_safe_windows function before you create a event base.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JackieSSS