The only value that can be modified, once the keymap is compiled, is the reference counter. Use atomics to make it thread-safe.
WARNING: this alone does not make the keymap API thread-safe:
It depends on the atom table in the xkb_context for its strings values; this table is not thread-safe.
However it is “safe” only if no other keymap is compiled using the same context.
Functions retrieving text may use the xkb_context internal string buffer, which is not thread safe.
API not using this buffer should be “safe”.
Functions use the xkb_context log function, but modifying it is not thread-safe.
(WIP, to open discussion)
The only value that can be modified, once the keymap is compiled, is the reference counter. Use atomics to make it thread-safe.
WARNING: this alone does not make the keymap API thread-safe:
xkb_context
for its strings values; this table is not thread-safe. However it is “safe” only if no other keymap is compiled using the same context.xkb_context
internal string buffer, which is not thread safe. API not using this buffer should be “safe”.xkb_context
log function, but modifying it is not thread-safe.Fixes #300