Skip to content

Avoid loop when tracing received messages. #267

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

Merged
merged 1 commit into from
Jan 29, 2016
Merged

Conversation

facundominguez
Copy link
Contributor

When a trace message was sent to "trace.logger", the NC would produce a trace message to indicate the arrival of it, this new trace message would in turn have the NC produce another trace message and so on.

In this patch the NC does not produce a trace message when the destination is the "trace.logger" process.

Test will be in an upcoming PR of distributed-process-tests.

@facundominguez
Copy link
Contributor Author

hm, had forgotten that tests live now on the same repo as d-p. I just included the tests in this PR then.

@facundominguez
Copy link
Contributor Author

Related to #265.


#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch, log)
#else
import Prelude hiding ((<*))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest prelude that exported catch in prelude 4.4.1, so I suppose we could drop this CPP thing and leave
only import Prelude (in case log should not be hidden)

@qnikst
Copy link
Contributor

qnikst commented Jan 22, 2016

Fails on 7.4 (can be removed from travis) and 7.6 due to build error, System.Environmentdidn't have setEnv and unsetEnv methods.

@qnikst
Copy link
Contributor

qnikst commented Jan 22, 2016

Everything else looks good to me.

When a trace message was sent to "trace.logger", the NC would produce
a trace message to indicate the arrival of it, this new trace message
would in turn have the NC produce another trace message and so on.

In this patch the NC does not produce a trace message when the
destination is the "trace.logger" process.
@hyperthunk
Copy link
Member

We handle those issues in d-process with conditional compilation, can't we do the same here? I mean, distributed-process uses {set,get}Env, in the tracing code...

@facundominguez
Copy link
Contributor Author

We handle those issues in d-process with conditional compilation.

Well, issues are solved now.

facundominguez added a commit that referenced this pull request Jan 29, 2016
Avoid loop when tracing received messages.
@facundominguez facundominguez merged commit d59ac11 into master Jan 29, 2016
@facundominguez facundominguez deleted the fd/trace-loop branch January 29, 2016 12:19
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.

3 participants