var ipy = require('ipy_node');
var bridge = new ipy.Bridge("http://idale.local:8888")
var kernel = null;
var deferred = bridge.start_kernel("bb4dca5b-288f-5163-9450-9a06dfbaed70").then(function(kernel) {
console.log('before');
});
console.log('after');
Right now, after shows up beforebefore. Both console.log show up after start_kernel is run. So syncrify works fine for that. But I currently return a resolved promise from a wrapped promiser. The .then on a resolved promise is not synchronous, which is why after shows up before before.
I need to create a fake then function that just calls the callback synchronously and not via Q's nextick.
Right now,
after
shows up beforebefore
. Bothconsole.log
show up afterstart_kernel
is run. So syncrify works fine for that. But I currently return a resolved promise from a wrapped promiser. The.then
on a resolved promise is not synchronous, which is whyafter
shows up beforebefore
.I need to create a fake
then
function that just calls the callback synchronously and not viaQ
's nextick.