> Le 2 mai 2017 à 09:00, John Found <johnfo...@asm32.info> a écrit :
> 
> What is the best way (less CPU consuming) to put a thread in sleep and wake 
> it up when new record has been written to a given table of SQLite database?
> 
> Now I am implementing this by polling and time based sleep, but such solution 
> is very dirty compromise, trading response time for CPU load. I want both. :)
> 
> -- 
> http://fresh.flatassembler.net
> http://asm32.info
> John Found <johnfo...@asm32.info>

Reading your question I assume a single, multi-threaded, application.  You 
could write a SQL function (see sqlite3_create_function_v2 and associates) 
which signal an event.  And add a SQL trigger calling this function when 
appropriate.


-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to