You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@task encapsulatedTask = {
*perform(value) {
console.log('encapsulated waiting for 5 seconds');
yield timeout(5000);
console.log('encapsulated all done waiting');
return 'all good';
}
}
@task
*printEncapsulatedTaskValue() {
this.encapsulatedTask.perform();
let value = yield waitForProperty(this.encapsulatedTask, 'last.value');
console.log('encapsulated value: ', value);
}
In the code above ☝️ the encapsulated value is never printed to the console. We do however see the logs to indicate that the encapsulatedTask ran fine.
However for a normal task like:
@task
*normalTask() {
console.log('normal: waiting for 5 seconds');
yield timeout(5000);
console.log('normal: all done waiting');
return 'all good';
}
@task
*printNormalTaskValue() {
this.normalTask.perform();
let value = yield waitForProperty(this.normalTask, 'last.value');
console.log('normal value: ', value);
}
The waitForProperty resolves just fine and we get to see normal value: all good on the console.
The text was updated successfully, but these errors were encountered:
colenso
changed the title
waitForProperty not resolving for encapsulated taskInstance
waitForProperty not resolving for encapsulated taskInstance return value
Apr 1, 2022
I've created a dummy project to demo this: https://github.com/colenso/concurrency-test
In the code above ☝️ the encapsulated value is never printed to the console. We do however see the logs to indicate that the encapsulatedTask ran fine.
However for a normal task like:
The
waitForProperty
resolves just fine and we get to seenormal value: all good
on the console.The text was updated successfully, but these errors were encountered: