[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [C++]



On Sun, 9 Dec 2007, Bo Simonsen wrote:
> 
> <KLIP>
> 
>> 1) Bruge lock på en mutex inden man kalder en modul funktion... for
>> derved
>>   at "spare" modul programmøren for at tænke thread-safe. Dette vil låse
>>   modulet for andre tråde... lidt skidt hvis modulet bliver brugt meget.
> 
> Ikke nogen god idé som regl, fordi det hindre programmøren i at lave sin
> kode effektiv, den anden vej rundt sikre du dig også mod at et plugin
> får dit software til at crashe.

Ja, og det er meget hurtigere/nemmere at skrive modulet... men jeg kan ikke
lige se hvorfor det forhindre programmøren i at skrive effektiv kode ?

>> 2) Overlade det til programmøren af modulet at være thread-safe...
>>   og derved at være lidt i det uvisse om modulet ligger serveren ned
>>   på den bekostning. Det bliver også meget svære at skrive moduler
>>   til serveren.
> 
> Det bedste valg imho. Men kunne du ikke i en klasse konstruktør el. angive
> om man ønsker thread safe eller ej?

Serveren er threaded så der er ikke rigtigt noget valg... eller havde du en
eller anden tanke med det ?

(John =;-)


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-01-01, 17:38 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *