Home | Community | Message Board


This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Unfolding Nature Shop: Unfolding Nature: Being in the Implicate Order

Jump to first unread post Pages: 1
OfflineDeekay
 User Gallery


Registered: 09/07/08
Posts: 3,220
Loc: Flag
Last seen: 2 years, 5 months
Multi threaded programs
    #14209295 - 03/30/11 12:23 PM (12 years, 9 months ago)

Threading - implement before - or after?

:strokebeard2:


--------------------
Check out my gallery :sun:

Do YOU have The Band's sheet music books? I am paying cash!


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 21 days
Re: Multi threaded programs [Re: Deekay]
    #14210527 - 03/30/11 04:37 PM (12 years, 9 months ago)

If you are going to thread a program, then it should be part of the design from the beginning.


--------------------
Just another spore in the wind.


Extras: Filter Print Post Top
InvisibleCosmicJokeM
happy mutant
 User Gallery


Registered: 04/05/00
Posts: 10,848
Loc: Portland, OR
Re: Multi threaded programs [Re: Deekay]
    #14211178 - 03/30/11 06:32 PM (12 years, 9 months ago)

in apps that i've seen it implemented into via patch, the performance gains have been minimal at best... probably best to start ground up.


--------------------
Everything is better than it was the last time.  I'm good.

If we could look into each others hearts, and understand the unique challenges each of us faces, I think we would treat each other much more gently, with more love, patience, tolerance, and care.

It takes a lot of courage to go out there and radiate your essence.

I know you scared, you should ask us if we scared too.  If you was there, and we just knew you cared too.


Extras: Filter Print Post Top
OfflineDeekay
 User Gallery


Registered: 09/07/08
Posts: 3,220
Loc: Flag
Last seen: 2 years, 5 months
Re: Multi threaded programs [Re: CosmicJoke]
    #14212380 - 03/30/11 10:22 PM (12 years, 9 months ago)

I'll let you know how it goes

:drgonz:


--------------------
Check out my gallery :sun:

Do YOU have The Band's sheet music books? I am paying cash!


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 21 days
Re: Multi threaded programs [Re: Deekay]
    #14212867 - 03/31/11 12:43 AM (12 years, 9 months ago)

> I'll let you know how it goes

Unless you have a very good reason to thread a program, I wouldn't bother.  In most cases (traditional pthreads), threading is very difficult to do and next to impossible to debug.  Apple's introduction of GCD and blocks, along with language support in objective-C, have made threading much easier in both respects, but it still not a task to be taken lightly.


--------------------
Just another spore in the wind.


Extras: Filter Print Post Top
OfflineDeekay
 User Gallery


Registered: 09/07/08
Posts: 3,220
Loc: Flag
Last seen: 2 years, 5 months
Re: Multi threaded programs [Re: Seuss]
    #14214114 - 03/31/11 10:22 AM (12 years, 9 months ago)

Quote:

Seuss said:
> I'll let you know how it goes

Unless you have a very good reason to thread a program, I wouldn't bother.  In most cases (traditional pthreads), threading is very difficult to do and next to impossible to debug.  Apple's introduction of GCD and blocks, along with language support in objective-C, have made threading much easier in both respects, but it still not a task to be taken lightly.




I don't have much choice in the matter and, I'll be using pthreads.

:drgonz: x2


--------------------
Check out my gallery :sun:

Do YOU have The Band's sheet music books? I am paying cash!


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 21 days
Re: Multi threaded programs [Re: Deekay]
    #14219004 - 04/01/11 04:30 AM (12 years, 9 months ago)

Have fun!  :smile:

Deadlocks and raceconditions are nasty to find, mainly because it is difficult to reproduce the problem in a controlled manner.  Be certain that your design is correct before you start.


--------------------
Just another spore in the wind.


Extras: Filter Print Post Top
InvisibleChespirito
Stranger
Male User Gallery


Registered: 02/13/09
Posts: 3,259
Re: Multi threaded programs [Re: Seuss]
    #14219404 - 04/01/11 07:40 AM (12 years, 9 months ago)

Thats for sure, I've only dealt with that once back in undergrad.  The Class was Operating Systems and it was a beast


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 21 days
Re: Multi threaded programs [Re: Chespirito]
    #14219429 - 04/01/11 07:50 AM (12 years, 9 months ago)

> Thats for sure, I've only dealt with that once back in undergrad.

I've done quite a bit of threaded programming, but it isn't something that I enjoy.  You really have to pay attention to detail.  For example, it is really easy to forget to release a mutex on an error condition or in a block of code that prematurely returns from a function.  Although I hate goto statements, I find myself using them a lot in threaded code to jump to a common exit point in order to avoid mutex unlock issues:
Code:

function abc()
{
get_mutex();
if (some condition)
do something;
else
goto done; // rather than a simple return
do some more stuff;

done:
release_mutex();
return;
}



--------------------
Just another spore in the wind.


Extras: Filter Print Post Top
OfflineDeekay
 User Gallery


Registered: 09/07/08
Posts: 3,220
Loc: Flag
Last seen: 2 years, 5 months
Re: Multi threaded programs [Re: Seuss]
    #14273019 - 04/11/11 03:31 PM (12 years, 9 months ago)

Quote:

Seuss said:
If you are going to thread a program, then it should be part of the design from the beginning.




Tell that to my professor :sad:

I'm taking an incomplete in the course as of now :mad:


--------------------
Check out my gallery :sun:

Do YOU have The Band's sheet music books? I am paying cash!


Extras: Filter Print Post Top
OfflineSeussA
Error: divide byzero


Folding@home Statistics
Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 21 days
Re: Multi threaded programs [Re: Deekay]
    #14274528 - 04/11/11 07:56 PM (12 years, 9 months ago)

Unfortunately, I found that most academic computer science professors have a very limited understanding of real life programming.  Threading sounds like a really neat concept until you sit down and actually do it, much the way that pulling out a tooth sounds like a really good way to get rid of a toothache until you actually try it.  Granted, computer science is much more than simply programming, but that does not forgive the comp sci academics for having nothing beyond a theoretical understanding of programming.

> I'm taking an incomplete in the course as of now :mad:

Been there, done that.  Just don't let it sit too long as an incomplete, or it will come back to bite you.


--------------------
Just another spore in the wind.


Extras: Filter Print Post Top
Jump to top Pages: 1

Unfolding Nature Shop: Unfolding Nature: Being in the Implicate Order


Similar ThreadsPosterViewsRepliesLast post
* file transfer program abhi 878 4 01/15/04 12:59 PM
by BigNerd
* Got spyware? popups? hidden files? annoying programs? ShroomismM 2,453 9 04/13/04 04:39 PM
by SkorpivoMusterion
* Programming books or tutorials? Anonymous 1,270 8 06/12/03 01:09 PM
by Anonymous
* Grow Rating Program teonacatl 961 3 08/06/03 09:03 AM
by teonacatl
* What can i program for you?
( 1 2 all )
vaporbrains 3,017 22 05/03/03 04:33 AM
by dumlovesyou
* favorite programs Vvellum 2,348 18 07/09/04 09:51 AM
by matts
* first programs? automanM 677 12 01/20/05 10:22 AM
by MAIA
* Looking for a program. Pinhead 1,028 7 08/30/03 09:14 PM
by bivalve

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
621 topic views. 0 members, 0 guests and 0 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2024 Mind Media. Some rights reserved.

Generated in 0.027 seconds spending 0.007 seconds on 14 queries.