[WIP] Thread safeness for ws_object type

work in progress. The actual type implementation is not thread safe
by now.