erpc-io / eRPC

Efficient RPCs for datacenter networks
https://erpc.io/
Other
835 stars 137 forks source link

Naming convention: the meaning of the suffix _st in function name? #52

Closed rhiswell closed 3 years ago

rhiswell commented 3 years ago

What does the suffix _st in function name mean? There are many functions with the above suffix in eRPC.

anujkaliaiitd commented 3 years ago

Hi, Zhiqiang. Thanks for the question. The prefix st stands for "single-thread", noting that function can only be called on one thread. Some of eRPC's functions can be called by multiple threads that are internal to eRPC (the "background threads"), so these functions are not st.

Edited: As of now, none of eRPC's public APIs is thread-safe in the general sense. There are locks for concurrent access by eRPC's own threads, but these locks may not guard concurrent access by application threads.

rhiswell commented 3 years ago

It all makes sense to me now. Thanks for your explanation.