Skip to content
New issue

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

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

Already on GitHub? # to your account

Makes sure it is OK for the profiled code to send/receive messages #13

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

Qqwy
Copy link
Contributor

@Qqwy Qqwy commented Sep 15, 2020

Currently, when the code that is being profiled receives messages, the first obtained message is the one that is returned by the profile do ... end block, rather than the actual result of the last statement in the block.

This PR fixes this issue by:

  1. Making sure at the end the message with the actual result of the
    whole block is obtained by using a reference.
  2. Forwarding all messages the spawned process might have obtained in
    the meantime to the original process.

by:

1. Making sure at the end the message with the actual result of the
   whole block is obtained by using a reference.
2. Forwarding all messages the spawned process might have obtained in
   the meantime to the original process.
@Qqwy Qqwy force-pushed the profiling_with_messages branch from 4b3eddf to bbb6120 Compare September 15, 2020 11:57
@parroty parroty merged commit 1657d9c into parroty:master Sep 22, 2020
@parroty
Copy link
Owner

parroty commented Sep 22, 2020

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants