@@ -1101,10 +1101,21 @@ CAMLprim value PQgetResult_stub(value v_conn)
1101
1101
}
1102
1102
1103
1103
noalloc_conn_info_intnat (PQconsumeInput )
1104
- noalloc_conn_info ( PQisBusy , Val_bool )
1104
+
1105
1105
noalloc_conn_info_intnat (PQflush )
1106
1106
noalloc_conn_info_intnat (PQsocket )
1107
1107
1108
+ CAMLprim value PQisBusy_stub (value v_conn )
1109
+ {
1110
+ CAMLparam1 (v_conn );
1111
+ PGconn * conn = get_conn (v_conn );
1112
+ bool res ;
1113
+ caml_enter_blocking_section ();
1114
+ res = PQisBusy (conn );
1115
+ caml_leave_blocking_section ();
1116
+ CAMLreturn (Val_bool (res ));
1117
+ }
1118
+
1108
1119
CAMLprim value PQCancel_stub (value v_conn )
1109
1120
{
1110
1121
CAMLparam1 (v_conn );
@@ -1392,9 +1403,9 @@ CAMLprim value PQendcopy_stub_bc(value v_conn)
1392
1403
static inline void notice_ml (void * cb , const char * msg )
1393
1404
{
1394
1405
value v_msg ;
1395
- /* CR mmottl for mmottl: this is not reliable and can lead to segfaults,
1396
- because the runtime lock may already be held (but not usually).
1397
- A runtime feature is needed to fully support this. */
1406
+ /* CR mmottl for mmottl: this is not reliable and can lead to deadlocks or
1407
+ other unintended behavior, because the runtime lock may already be held
1408
+ (but not usually). A runtime feature is needed to fully support this. */
1398
1409
caml_leave_blocking_section ();
1399
1410
v_msg = make_string (msg );
1400
1411
caml_callback (((np_callback * ) cb )-> v_cb , v_msg );
0 commit comments