Hack Forums
[C] Event loop ingredients for elaboration - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] Event loop ingredients for elaboration (/showthread.php?tid=6065269)



Event loop ingredients for elaboration - zNinja - Apr 9, 2020

Finally finished test concept. All ingredients needed to build event loop system.
TimerService could be more optimized, but it does very nice job. If anyone is interesting to give opinion I will be happy.

Output
PHP Code

<?php 
call in main thread
call in other thread
time interval call
timeout should run first
timeout should run second
time interval call
time interval call
timeout call in other thread 
time interval call
time interval call
time interval call
time interval call
time interval call
time interval call
timeout should be called 10000 milliseconds after program start
, time paused:10000
cleaning up
thread poll clean up ok
timer service clean ok
ref_counter
:0
ref_aloc
:30
ref_dealoc
:30