Search:
Type: Posts; User: dvyukov
Search:
Search took 0.31 seconds.
-
April 28th, 2010, 01:46 AM
There is not best way for that, because the idea is busted in itself.
What is the best way to manage 100 programmers to work on a single computer? Sorry, you just need more computers.
-
April 28th, 2010, 01:41 AM
Yeah, until your own locking mechanism does not outperform those "perfectly good locks" by several orders of magnitude.
-
April 28th, 2010, 01:38 AM
mrgr8avill, you need something along the lines of:
class request_queue
{
public:
void enqueue(request* req)
{
bool notify = false;
-
April 27th, 2010, 06:13 AM
Here is code that works:
class CReaderThread : public CWinThread
{
afx_msg void OnMessageTest( WPARAM, LPARAM )
{
AfxMessageBox(L"MESSAGE ARRIVED");
}
virtual BOOL InitInstance( )
-
April 27th, 2010, 05:03 AM
I do not remember already how to do that in MFC, but in WinAPI one must do something along the lines of:
BOOL rv;
MSG msg = {};
while (0 != (rv = GetMessage(&msg, 0, 0, 0)))
{
...
-
April 27th, 2010, 05:01 AM
About AfxEndThread:
"Call this function to terminate the currently executing thread."
-
April 27th, 2010, 04:49 AM
Also I do not see where you start message loop, where you pump messages.
-
April 27th, 2010, 04:48 AM
AfxEndThread() call looks a bit suspicious. What it's for?
-
April 27th, 2010, 02:47 AM
There is a technique called PCOW (partial copy-on-write), it works for any kind of recursive data structures (lists, trees). It provides serializable operations and zero-overhead 100% scalable...
-
April 26th, 2010, 02:13 AM
> By "better", I'm thinking in terms of not using a keyword that was never intended for multi-threading use
I do not use volatiles for multi-threading. I use load_consume()/store_release() for...
-
April 26th, 2010, 02:06 AM
> Is the volatile cast only to ensure the compiler generates are real load/store? If so, would it be "better" to use some sort inline assembly trick to ensure the load/store is generated?
Until...
-
April 26th, 2010, 02:02 AM
> But in the video at around 24:22, it sounds like he was only referring to compiler re-ordering - in that the compiler can not reorder volatile accesses relative to other volatile access - but the...
-
April 26th, 2010, 01:58 AM
>> Volatile accesses can't be reordered only relative to other volatile accesses.
> Absolutely, and that's what I intended. I should of been more clear (via the text in red). Thanks for pointing...
-
April 24th, 2010, 12:57 AM
> Is it only the Itanium that supports the acquire/release versions of these functions, or are they available on Xeons and i7s?
Yes and No. They are implicit on Xeons and i7s. I.e. every load is...
-
April 23rd, 2010, 01:16 PM
> Is it only the Itanium that supports the acquire/release versions of these functions, or are they available on Xeons and i7s?
Yes and No. They are implicit on Xeons and i7s. I.e. every load is...
-
April 23rd, 2010, 01:15 PM
> Is it only the Itanium that supports the acquire/release versions of these functions, or are they available on Xeons and i7s?
Yes and No. They are implicit on Xeons and i7s. I.e. every load is...
-
April 23rd, 2010, 01:13 PM
> Can someone give a simple example of how this asymmetry can be used to acheive something more efficient than a full fence?
Here is a single-producer/single-consumer queue which is based on...
-
April 23rd, 2010, 01:11 PM
> Dr. Breshears states loading from a volatilve variable effects an acquire fence and storing into a volatile effects a release fence
From C++ point of view volatile have nothing to do with...
-
April 23rd, 2010, 01:09 PM
> Can someone explain why these two purposes are intertwined in these functions?
Because they are almost always required at the same time.
If they would not provide fences, then it hardly be the...
-
April 23rd, 2010, 01:03 PM
> From a standards perspective, volatile accesses are more like a full fence - because the compiler can't move any volatile load/store instruction before/after another.
Nope. That's not true....
-
April 20th, 2010, 01:51 PM
Start here:
Parallel Computing with Managed Code
http://msdn.microsoft.com/en-us/concurrency/ee851578.aspx
-
April 20th, 2010, 01:45 PM
Tersteeg , ConcRT is a native API, it's of no help in the VB.Net/C# world.
Intel Parallel Studio is also targeted at native world.
VB.Net/C# developer may take a look at Task Parallel Library...
-
April 20th, 2010, 01:28 PM
> Tasks I presume being related to the thread pool pattern.
Yes, a pool of kernel threads execute a set of tasks.
-
April 20th, 2010, 01:55 AM
First of all, user mode "threads" (fibers) are not actually threads in the sense that they do not allow one to utilize parallel hardware. They are useful only as a replacement for explicit state...
-
April 20th, 2010, 01:42 AM
Hannes, I believe CreateThread() is just not guaranteed to work in VB. Isn't it? Your programming system provides an API for thread creation, so use it. For example, in Visual C++ CreateThread() is...
|
Click Here to Expand Forum to Full Width
|