Skip to content

Conversation

@ggPeti
Copy link
Contributor

@ggPeti ggPeti commented Feb 13, 2014

Because the Future class is a subclass of Delegator, it tries to delegate everything. Even raise! Thus, we need to explicitly call Kernel.raise, otherwise we get a SystemStackError. The specs were incorrect as well, because they did not explicitly check for the error type and message, only expecting an ::Exception to be raised.

@ggPeti
Copy link
Contributor Author

ggPeti commented Feb 14, 2014

Well, the build failed, but that's because a spec for another issue is nondeterministic: it sets up a future with a 1 second sleep inside a thread, then waits 2 seconds for that thread to terminate. Looks like this time it wasn't enough. I added another 0.5 seconds of sleep to better our chances of the thread terminating in time.

@josepjaume
Copy link
Contributor

Looks awesome, thanks!

josepjaume added a commit that referenced this pull request Feb 18, 2014
Fixed incorrectly trying to raise an error
@josepjaume josepjaume merged commit 2b9f567 into codegram:master Feb 18, 2014
@ggPeti ggPeti deleted the fix_raising_stored_error branch February 18, 2014 12:57
@ggPeti ggPeti restored the fix_raising_stored_error branch February 18, 2014 12:58
@ggPeti
Copy link
Contributor Author

ggPeti commented Feb 23, 2014

Can you please release a new version with this fix? I'd love to get rid of the monkey patch I'm using for this right now :)

@josepjaume
Copy link
Contributor

Of course!

@josepjaume
Copy link
Contributor

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants