xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

No Asynchronous version of prepareSync() #65

Open heri16 opened 7 years ago

heri16 commented 7 years ago

The code below causes a deadlock:

async.parellel([
  function(cb) { conn.prepareSync(); cb(); },
  function(cb) { conn.prepareSync(); cb(); },
], function(err, results) {});
xdenser commented 7 years ago

strange, this should work

heri16 commented 7 years ago

There is no conn.prepare(callback) version.

xdenser commented 7 years ago

How about this

async.parellel([
  function(cb) { conn.prepareSync(); setImmediate(cb); },
  function(cb) { conn.prepareSync(); setImmediate(cb); },
], function(err, results) {});

?