Function sdl2_sys::SDL_CreateThread

source ·
pub unsafe extern "C" fn SDL_CreateThread(
    fn_: SDL_ThreadFunction,
    name: *const c_char,
    data: *mut c_void
) -> *mut SDL_Thread
Expand description

Create a thread.

Thread naming is a little complicated: Most systems have very small limits for the string length (Haiku has 32 bytes, Linux currently has 16, Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You’ll have to see what happens with your system’s debugger. The name should be UTF-8 (but using the naming limits of C identifiers is a better bet). There are no requirements for thread naming conventions, so long as the string is null-terminated UTF-8, but these guidelines are helpful in choosing a name:

http://stackoverflow.com/questions/149932/naming-conventions-for-threads

If a system imposes requirements, SDL will try to munge the string for it (truncate, etc), but the original string contents will be available from SDL_GetThreadName().