@@ -60,7 +60,9 @@ Handle<Value> Connection::Execute(const Arguments& args) {
60
60
return Undefined ();
61
61
}
62
62
63
- eio_custom (EIO_Execute, EIO_PRI_DEFAULT, EIO_AfterExecute, baton);
63
+ uv_work_t * req = new uv_work_t ();
64
+ req->data = baton;
65
+ uv_queue_work (uv_default_loop (), req, EIO_Execute, EIO_AfterExecute);
64
66
ev_ref (EV_DEFAULT_UC);
65
67
66
68
connection->Ref ();
@@ -91,7 +93,9 @@ Handle<Value> Connection::Commit(const Arguments& args) {
91
93
return Undefined ();
92
94
}
93
95
94
- eio_custom (EIO_Commit, EIO_PRI_DEFAULT, EIO_AfterCommit, baton);
96
+ uv_work_t * req = new uv_work_t ();
97
+ req->data = baton;
98
+ uv_queue_work (uv_default_loop (), req, EIO_Commit, EIO_AfterCommit);
95
99
ev_ref (EV_DEFAULT_UC);
96
100
97
101
connection->Ref ();
@@ -115,7 +119,9 @@ Handle<Value> Connection::Rollback(const Arguments& args) {
115
119
return Undefined ();
116
120
}
117
121
118
- eio_custom (EIO_Rollback, EIO_PRI_DEFAULT, EIO_AfterRollback, baton);
122
+ uv_work_t * req = new uv_work_t ();
123
+ req->data = baton;
124
+ uv_queue_work (uv_default_loop (), req, EIO_Rollback, EIO_AfterRollback);
119
125
ev_ref (EV_DEFAULT_UC);
120
126
121
127
connection->Ref ();
@@ -248,13 +254,13 @@ row_t* Connection::CreateRowFromCurrentResultSetRow(oracle::occi::ResultSet* rs,
248
254
return row;
249
255
}
250
256
251
- void Connection::EIO_Commit (eio_req * req) {
257
+ void Connection::EIO_Commit (uv_work_t * req) {
252
258
CommitBaton* baton = static_cast <CommitBaton*>(req->data );
253
259
254
260
baton->connection ->m_connection ->commit ();
255
261
}
256
262
257
- int Connection::EIO_AfterCommit (eio_req * req) {
263
+ void Connection::EIO_AfterCommit (uv_work_t * req) {
258
264
CommitBaton* baton = static_cast <CommitBaton*>(req->data );
259
265
ev_unref (EV_DEFAULT_UC);
260
266
baton->connection ->Unref ();
@@ -264,16 +270,15 @@ int Connection::EIO_AfterCommit(eio_req* req) {
264
270
baton->callback ->Call (Context::GetCurrent ()->Global (), 1 , argv);
265
271
266
272
delete baton;
267
- return 0 ;
268
273
}
269
274
270
- void Connection::EIO_Rollback (eio_req * req) {
275
+ void Connection::EIO_Rollback (uv_work_t * req) {
271
276
RollbackBaton* baton = static_cast <RollbackBaton*>(req->data );
272
277
273
278
baton->connection ->m_connection ->rollback ();
274
279
}
275
280
276
- int Connection::EIO_AfterRollback (eio_req * req) {
281
+ void Connection::EIO_AfterRollback (uv_work_t * req) {
277
282
RollbackBaton* baton = static_cast <RollbackBaton*>(req->data );
278
283
ev_unref (EV_DEFAULT_UC);
279
284
baton->connection ->Unref ();
@@ -283,10 +288,9 @@ int Connection::EIO_AfterRollback(eio_req* req) {
283
288
baton->callback ->Call (Context::GetCurrent ()->Global (), 1 , argv);
284
289
285
290
delete baton;
286
- return 0 ;
287
291
}
288
292
289
- void Connection::EIO_Execute (eio_req * req) {
293
+ void Connection::EIO_Execute (uv_work_t * req) {
290
294
ExecuteBaton* baton = static_cast <ExecuteBaton*>(req->data );
291
295
292
296
baton->rows = NULL ;
@@ -436,7 +440,7 @@ Local<Array> Connection::CreateV8ArrayFromRows(ExecuteBaton* baton) {
436
440
return rows;
437
441
}
438
442
439
- int Connection::EIO_AfterExecute (eio_req * req) {
443
+ void Connection::EIO_AfterExecute (uv_work_t * req) {
440
444
ExecuteBaton* baton = static_cast <ExecuteBaton*>(req->data );
441
445
ev_unref (EV_DEFAULT_UC);
442
446
baton->connection ->Unref ();
@@ -469,7 +473,6 @@ int Connection::EIO_AfterExecute(eio_req* req) {
469
473
}
470
474
471
475
delete baton;
472
- return 0 ;
473
476
}
474
477
475
478
void Connection::setConnection (oracle::occi::Environment* environment, oracle::occi::Connection* connection) {
0 commit comments