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

Translate the code from C# to C++ #26

Open
Konard opened this issue Jul 22, 2020 · 5 comments
Open

Translate the code from C# to C++ #26

Konard opened this issue Jul 22, 2020 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed reward This issue have an reward that is paid on completion.

Comments

@Konard
Copy link
Member

Konard commented Jul 22, 2020

1000 RUB reward can be claimed by anyone who completes this task.

@Konard Konard added good first issue Good for newcomers help wanted Extra attention is needed labels May 22, 2021
@uselessgoddess
Copy link
Member

Not good first issue

@Konard Konard added the reward This issue have an reward that is paid on completion. label Sep 15, 2021
@Konard Konard pinned this issue Sep 19, 2021
@Konard
Copy link
Member Author

Konard commented Sep 19, 2021

ConcurrentQueue alternative: https://github.com/cameron314/concurrentqueue
ReaderWriterLockSlim alternative: https://en.cppreference.com/w/cpp/thread/shared_mutex
Task alternative: https://en.cppreference.com/w/cpp/thread/async
new Thread(...) and Thread.Start alternative: https://en.cppreference.com/w/cpp/thread/thread
Thread.Sleep alternative: https://en.cppreference.com/w/cpp/thread/yield or https://en.cppreference.com/w/cpp/thread/sleep_for

Looks like we cannot support InvokeWithExtendedMaxStackSize unless we decide to depend on boost (https://stackoverflow.com/questions/13871763/how-to-set-the-stacksize-with-c11-stdthread)

See also: https://en.cppreference.com/w/cpp/thread

@uselessgoddess
Copy link
Member

uselessgoddess commented Sep 19, 2021

Instead of ConceuurentQueue and all other concurrent containers: https://habr.com/ru/post/328348/
[maybe later] Instead of std::shared_mutex: more fast https://habr.com/ru/post/328362/
Instead of std::thread use more safe std::jthread

@uselessgoddess
Copy link
Member

uselessgoddess commented Sep 19, 2021

Also, can use https://en.cppreference.com/w/cpp/thread/packaged_task

@uselessgoddess
Copy link
Member

@Konard please review this request #49 and new Sync class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed reward This issue have an reward that is paid on completion.
Projects
None yet
Development

No branches or pull requests

2 participants