an easy solution could be to create a worker thread in js via firefox's web workers instead. Your dll could still have its own thread pool, but using the firefox worker thread as a synchronous hub...
I cannot say how it works on OSX, but in Windows a DLL has no notion of "main thread", it's the loading process that controls in which thread the invoked dll procedures are called. Now, is the...
I'm so sorry I must confess, sometimes I get really confused, sometimes I don't even remember if I read a book or not ( but luckily you know better than me ! ) ... then, dominated by embarassment I...
laserlight, I think it's time to surrender to nuzzle's mind reading abilities ... now, I'm just curious to see if OReubens has more patience than I have ... :)
according to the standard, the concatenation of string literals has its own translation phase (6th) occuring after macro expansion but before unit translation. So, at least standard-wise, they are...
first of all, this is all implementation defined behavior. Even the signedness of an "int" bitfield is implementation defined ( you should write "signed int" to enforce a signed integer, although int...
regarding the hypothetical thread-friendly heap I agree with you, it seems possible only as a compromise rendering some use cases sub-optimal ( which is against the C++ philosophy, IMHO ).
given an NP-complete problem A and a problem B, in order to prove that B is at least NP-complete you should solve A in terms of B; if I read your post correctly, you did the opposit, so you didn't...
maybe it's a terminology problem, but to me, "connected", "brittle" and "monolithic" are properties related to a (library) design, not its implementation, sorry if you meant something else. The STL...
surprisingly (?), you not only insist on ignoring others' advice, you also keep saying wrong things proving poor understanding of basic programming facts:
tell me, where did I say that the reason of non-scalability is the virtual call ??? the point is exactly to avoid that "selection" in the first place, unless it's truly required to happen at runtime....
yes, my tentative code snippet is supposed to do exactly what you describe: it parses the description file extracting each frame definition, which is then put in an unordered_map that allows you to...
there are many ways of doing such a thing, ranging from the straightforward ( S_M_A's suggestion; BTW, I think he already implied the preprocessing and caching of the file data, no need to read the...
I think the major source of inefficiency of heap-managed objects is not much the allocation process per-se, but rather that such an approach usually implies a run-time binding of the abstraction...
evilGil, contrary to most boost libraries, boost::thread is NOT header-only and it should be compiled separately to the wanted target. With VC++, everything is automated, just take a look at boost...
D Drmmr, that code doesn't seem correct to me because std::thread destructor will call terminate() if still joinable ( due to exception safety reasons ). Hence, you must either detach() or join() in...
this is true, but is it really worth it ? consider the OP's doubts and georanger's reference aversion; I think both come from the fact that when they look at a code like "f(T& x)" they view the "&"...
regarding your original use case, all threading libraries I know of allow you to pass data to the spawn thread; for example, given some synchronization object "mysync", in c++11 you can write things...
actually, one could say the same thing in C++: one can think at "pass-by-reference" simply as the process of initializing a variable of reference type. This way of thinking is especially useful given...