Skip to content

Not pausing as expected #57

@boxxa

Description

@boxxa

I am trying to wrap a function out of the talib library for the talib.execute(). Example code is https://github.com/oransel/node-talib/blob/master/examples/sma.js

Here is my function with synchronize and can't seem to get it to wait. emaData returns undefined and then the "EMA Function Done." message hits after. What am I missing with the sync wrapper?

`sync(talib, "execute")

var emaData = sync.fiber(function(){
talib.execute({
name: "EMA",
startIdx: 0,
endIdx: series.length - 1,
inReal: series,
optInTimePeriod: 3
}, function (err, result) {
console.log("EMA Function Done.");
return result
});
return emaData
})
console.log(emaData)
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions