diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-08-23 13:45:32 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-08-23 13:45:32 +0100 |
commit | 8c98b1f31b80702c5634f634a59a9f950d57a9a0 (patch) | |
tree | 7da9fe321b3a1ddb70e794c1b951420f737b0ee3 /src/lua/lua_thread_pool.h | |
parent | 170a4c4a04208aad1249494321be64e1f7b6c71b (diff) | |
download | rspamd-8c98b1f31b80702c5634f634a59a9f950d57a9a0.tar.gz rspamd-8c98b1f31b80702c5634f634a59a9f950d57a9a0.zip |
[Minor] Added coroutine support to HTTP module
Diffstat (limited to 'src/lua/lua_thread_pool.h')
-rw-r--r-- | src/lua/lua_thread_pool.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lua/lua_thread_pool.h b/src/lua/lua_thread_pool.h index e5b2f2873..c77f77455 100644 --- a/src/lua/lua_thread_pool.h +++ b/src/lua/lua_thread_pool.h @@ -71,15 +71,6 @@ void lua_thread_pool_return(struct lua_thread_pool *pool, struct thread_entry *thread_entry); /** - * Removes thread from Lua state. It should be done to dead (which ended with an error) threads only - * - * @param pool - * @param thread_entry - */ -void -lua_thread_pool_terminate_entry(struct lua_thread_pool *pool, struct thread_entry *thread_entry); - -/** * Currently running thread. Typically needed in yielding point - to fill-up continuation. * * @param pool @@ -115,8 +106,15 @@ void lua_thread_pool_restore_callback (struct lua_callback_state *cbs); +/** + * Acts like lua_call but the tread is able to suspend execution. + * As soon as the call is over, call either thread_entry::finish_callback or thread_entry::error_callback. + * + * @param thread_entry + * @param narg + */ void -lua_thread_call (struct lua_thread_pool *pool, struct thread_entry *thread_entry, int narg); +lua_thread_call (struct thread_entry *thread_entry, int narg); #endif /* LUA_THREAD_POOL_H_ */ |