You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2021. It is now read-only.
Visitors should, as a general rule, be fired off as separate goroutines and receive updates from the traversal algorithm via a buffered channel. this will allow traversal to occur independent of processing.
alternatively, because this is still basically a traversal, it may be preferable to keep the traversal algorithm communicating with the visitor via function calls, but provide a reference/default/simple implementation of the visitor that creates such channels and does the communication there. in fact...that's probably the preferable route, because that means the base/interface-specified case is still as fast as possible, but a simple pattern is established whereby it can can be translated into channels (which is the pattern generally considered optimal for gogl).
The text was updated successfully, but these errors were encountered:
sdboyer
changed the title
Change visitors to operate in goroutines and communicate over channels
Create a visitor pattern where communication happens through channels
Apr 28, 2014
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Visitors should, as a general rule, be fired off as separate goroutines and receive updates from the traversal algorithm via a buffered channel. this will allow traversal to occur independent of processing.
alternatively, because this is still basically a traversal, it may be preferable to keep the traversal algorithm communicating with the visitor via function calls, but provide a reference/default/simple implementation of the visitor that creates such channels and does the communication there. in fact...that's probably the preferable route, because that means the base/interface-specified case is still as fast as possible, but a simple pattern is established whereby it can can be translated into channels (which is the pattern generally considered optimal for gogl).
The text was updated successfully, but these errors were encountered: