-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add multithreaded variant to ICU port #15592
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <thread> | ||
#include <iostream> | ||
#include <unicode/unistr.h> | ||
|
||
// Test that code using both pthread and icu compiles. | ||
int main () { | ||
std::thread([] { | ||
std::string str; | ||
icu::UnicodeString ustr("Hello world!"); | ||
ustr.toUTF8String(str); | ||
std::cout << str << std::endl; | ||
}).detach(); | ||
|
||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11125,6 +11125,10 @@ def test_pthread_out_err(self): | |
self.set_setting('EXIT_RUNTIME') | ||
self.do_other_test('test_pthread_out_err.c') | ||
|
||
@node_pthreads | ||
def test_icu_mt(self): | ||
|
||
self.do_smart_test(test_file('other/test_pthread_icu.cpp'), emcc_args=['-pthread', '-sUSE_ICU', '-sPTHREAD_POOL_SIZE_STRICT=4', '-sEXIT_RUNTIME']) | ||
|
||
|
||
# unistd tests | ||
|
||
def test_unistd_confstr(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we are not yet consistent, but we are trying to use a consistent style these days which involves 2-space indentation (we have a .clang-format file if you want to just use that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Can I recommend mentioning the existence of a style convention in Contributing or Developer's Guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we should do that.