haskell-distributed / haskell-distributed/distributed-process
withMonitor should provide monitor reference
Open
@qnikst is already working on this.
Since Mar 10, 2016.
Bug
- Dominant language
- Haskell
- Stars
- 751
- Forks
- 99
- Avg merge
- 45m
- Merged PRs (30d)
- 2
Description
Currently withMonitor is defined as
withMonitor :: ProcessId -> Process a -> Process a
withMonitor pid code = bracket (monitor pid) unmonitor (\_ -> code)
but it should be defined as
withMonitor :: ProcessId -> (MonitorRef -> Process a) -> Process a
withMonitor pid = bracket (monitor pid) unmonitor
Although it is possible, using the existing withMonitor, to wait for a MonitorNotification that matches the appropriate ProcessId, if another monitor exists for the same process ID then this may remove the wrong message from the process's mailbox.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.