Re: Using wodKeys in multiple threads - WeOnlyDo Discussion board

Re: Using wodKeys in multiple threads (General questions)

by mulloju, Friday, November 04, 2011, 12:14 (4579 days ago) @ wodDamir

Hi,

I don't think I can easily share the code. Basically, the main process spawns N threads, each of the N threads spawn their own M threads, and inside each M thread I create a Keys instance like I showed earlier.

These kind of errors I get while debugging. Perhaps occurs more often if I have enabled some breakpoints:

HEAP[xxx.exe]: Invalid address specified to RtlReAllocateHeap( 03B30000, 03B36698 )
Windows has triggered a breakpoint in xxx.exe.

callstack:

HRESULT CreateInstance(const CLSID& rclsid, IUnknown* pOuter = NULL, DWORD dwClsContext = CLSCTX_ALL) throw() ->
...
hr = CoCreateInstance(rclsid, pOuter, dwClsContext, __uuidof(IUnknown), reinterpret_cast<void**>(&pIUnknown)); ->
...
...
asctime.c ->
errno_t __cdecl _tasctime_s (
_TSCHAR *buffer,
size_t sizeInChars,
REG1 const struct tm *tb
)


Complete thread: