Skip to main content
Question Protected by gnat
Tweeted twitter.com/#!/StackProgrammer/status/592889393431588865
added 32 characters in body
Source Link

I took it upon myself recently to work towards making a general-purpose Translator to automatically translate js programs into C, but I got stuck when thinking of asynchronous behaviour. Using ANSI / POSIX C, and only allowing yourself to use a library for a threadpool implementation, how would you go about implementing asynchronous function calls in C. The methodology must be thread-safe. When I came up with my approach, I was inspired by this source's use of what they call the Asynchronous Dispatcher pattern: https://doanduyhai.wordpress.com/2012/08/04/design-pattern-the-asynchronous-dispatcher/

I took it upon myself recently to work towards making a Translator to translate js programs into C, but I got stuck when thinking of asynchronous behaviour. Using ANSI / POSIX C, and only allowing yourself to use a library for a threadpool implementation, how would you go about implementing asynchronous function calls in C. The methodology must be thread-safe. When I came up with my approach, I was inspired by this source's use of what they call the Asynchronous Dispatcher pattern: https://doanduyhai.wordpress.com/2012/08/04/design-pattern-the-asynchronous-dispatcher/

I took it upon myself recently to work towards making a general-purpose Translator to automatically translate js programs into C, but I got stuck when thinking of asynchronous behaviour. Using ANSI / POSIX C, and only allowing yourself to use a library for a threadpool implementation, how would you go about implementing asynchronous function calls in C. The methodology must be thread-safe. When I came up with my approach, I was inspired by this source's use of what they call the Asynchronous Dispatcher pattern: https://doanduyhai.wordpress.com/2012/08/04/design-pattern-the-asynchronous-dispatcher/

Source Link

Implementation of Asynchronous function call in C

I took it upon myself recently to work towards making a Translator to translate js programs into C, but I got stuck when thinking of asynchronous behaviour. Using ANSI / POSIX C, and only allowing yourself to use a library for a threadpool implementation, how would you go about implementing asynchronous function calls in C. The methodology must be thread-safe. When I came up with my approach, I was inspired by this source's use of what they call the Asynchronous Dispatcher pattern: https://doanduyhai.wordpress.com/2012/08/04/design-pattern-the-asynchronous-dispatcher/