File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,14 @@ namespace async_postgres::lua {
241
241
lua->PushBool (false );
242
242
return 1 ;
243
243
}
244
+
245
+ lua_protected_fn (isBusy) {
246
+ lua->CheckType (1 , async_postgres::connection_meta);
247
+ auto state = lua_connection_state ();
248
+ lua->PushBool (state->reset_event ||
249
+ state->query ); // busy if reset or query are in progress
250
+ return 1 ;
251
+ }
244
252
} // namespace async_postgres::lua
245
253
246
254
#define register_lua_fn (name ) \
@@ -263,6 +271,7 @@ void register_connection_mt(GLua::ILuaInterface* lua) {
263
271
register_lua_fn (reset);
264
272
register_lua_fn (setNotifyCallback);
265
273
register_lua_fn (wait);
274
+ register_lua_fn (isBusy);
266
275
267
276
async_postgres::register_misc_connection_functions (lua);
268
277
You can’t perform that action at this time.
0 commit comments