Skip to content
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

Enhance WebConnector.connect() method through Latch #37

Closed
samchon opened this issue Jun 3, 2020 · 0 comments
Closed

Enhance WebConnector.connect() method through Latch #37

samchon opened this issue Jun 3, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@samchon
Copy link
Owner

samchon commented Jun 3, 2020

Looking at implementation code of WebConnector.connect(), you can see that the method is synchronized through Promise pattern. However, the implementation seems dangerous because sequence of the synchronization are separated to many parts and those separated codes make the implementation code complicate.

To simplify the WebConnector.connect() method without damaging the synchronization, it would better to utilizing Latch class, who is a type of thread supporting component and newly added to C++20 and TSTL v2.3. Implementation code of the WebConnector.connect() method can be much simple through the Latch.wait_for() and Latch.count_down() method.

@samchon samchon added the enhancement New feature or request label Jun 3, 2020
@samchon samchon self-assigned this Jun 3, 2020
samchon pushed a commit that referenced this issue Jun 3, 2020
samchon pushed a commit that referenced this issue Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant