haskell-distributed / haskell-distributed/distributed-process

withMonitor should provide monitor reference

Open
#273 7 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.