google / benchmark

A microbenchmark support library
Apache License 2.0
8.59k stars 1.57k forks source link

[FR]disable threads for wasm? #1774

Open trcrsired opened 3 months ago

trcrsired commented 3 months ago

i try to use google benchmark for wasm and it does not provide thread. Is that possible to use this without pthread?

dmah42 commented 3 months ago

https://github.com/google/benchmark/blob/main/CMakeLists.txt#L324 we expect to have pthreads available

LebedevRI commented 3 months ago

I guess we only really need threading for ->Threads() feature, so we could make it disable-ableable. Do we want that?

justzh commented 3 months ago

No, you don't disable threads for wasm; disable threads for meta-data.

justzh commented 3 months ago

Thoughts?

LebedevRI commented 3 months ago

I'm afraid i'm failing to parse last two comments. The topic-starter is asking about being able to build the library without threading, and i've said that we could theoretically do that since we don't strictly need them always.

justzh commented 3 months ago

hai

justzh commented 3 months ago

I think we want that, um, uhhhhhh, yeah..

justzh commented 3 months ago

We don't need this customer.

justzh commented 3 months ago

Sorry, but it's true.