Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Create a visitor pattern where communication happens through channels #20

Open
sdboyer opened this issue Apr 26, 2014 · 0 comments
Open
Assignees

Comments

@sdboyer
Copy link
Owner

sdboyer commented Apr 26, 2014

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).

@sdboyer sdboyer self-assigned this Apr 26, 2014
@sdboyer 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 free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant