Threads reading from the same file!

Everything else that doesn't fall into one of the other PB categories.
User avatar
idle
Always Here
Always Here
Posts: 6239
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

google turns up a few issues

http://www.google.co.nz/search?q=create ... hl=en&sa=2

sounds like it's the GDI having the threading issue.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

@Idle : that is great; thanks.

I didn't search myself because previous searches regarding EMF problems on Vista turned up little of any consequence, but this stuff hits the nail right on the head!

Thanks again. :)
I may look like a mule, but I'm not a complete ass.
maw

Post by maw »

Here's some more detailed information from the developers of Windows 7 about how the GDI actually can stall Windows because of the current single threaded design and how they have overcome this in Windows 7. It doesn't solve your problem, but I'll bet the problem doesn't occur under Win7!

http://blogs.msdn.com/e7/archive/2009/0 ... mance.aspx

This is also explains why Win7 feels so responsive, because it really is!
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

A very interesting read Maw - thanks.

As you say though, probably unrelated to the EMF problem. The links pointed to by Idle demonstrate that the EMFiles resulting from multiple threads simply do not contain all of the GDI instructions which are being sent their way; some instructions are being 'lost' along the way and that is exactly what I am seeing! Incorrect fonts, lines appearing where they shouldn't be etc.

I have decided to implement a simple locking mechanism - no mutexes needed which should allow me to continue with the multiple threads. :)
I may look like a mule, but I'm not a complete ass.
User avatar
idle
Always Here
Always Here
Posts: 6239
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

I liked the MS answer to it the issue, by design, lol!

EMF's are the round peg bashed through the square hole!
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

idle wrote:I liked the MS answer to it the issue, by design, lol!

EMF's are the round peg bashed through the square hole!
They are bloody useful though! :wink:
I may look like a mule, but I'm not a complete ass.
User avatar
idle
Always Here
Always Here
Posts: 6239
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

> They are bloody useful though! :Wink:

Yes but only as long as you don't break you're keyboard while trying to bash the peg in the hole. :lol:
Post Reply