Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailBox.recieveWithin eats messages #3799

Closed
scabug opened this issue Aug 26, 2010 · 4 comments
Closed

MailBox.recieveWithin eats messages #3799

scabug opened this issue Aug 26, 2010 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Aug 26, 2010

There is a bug in the implementation of MailBox.receiveWithin. If the call timesout then the next message that could have been sent to the block will be sent to that block (which is no longer valid) rather than either going into the pending queue or to a current waiting block. The bug appears to be caused by the timedout block not removing itself from the list of available receivers, this may also be a memory leak until an appropriate message is sent.

Gist of testcase and email to scala-users lists: http://gist.github.com/547596 (ill attach both to this ticket)

@scabug
Copy link
Author

scabug commented Aug 26, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3799?orig=1
Reporter: Sam Hendley (samhendley)
Attachments:

@scabug
Copy link
Author

scabug commented Aug 26, 2010

Sam Hendley (samhendley) said:
Test Case showing Mailbox.recieveWithin issue

@scabug
Copy link
Author

scabug commented Aug 26, 2010

Sam Hendley (samhendley) said:
There was some talk on the #scala IRC channel that this is an actor subsystem only class, not suitable for public consumption, if so then the documentation should be updated to reflect that. One person in IRC said it didn't appear that the receieveWithin is used in the actor subsystem so it could be removed entirely.

@scabug
Copy link
Author

scabug commented Dec 12, 2011

@phaller said:
This Mailbox class has been deprecated at least since Scala 2.9. It will be removed in Scala 2.10.

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

No branches or pull requests

2 participants