synchronicitypackageThispackageprovidessupportforsynchronizationviamutexesandmayeventuallysupportinterprocesscommunicationipcandmessagepassing DescriptionThispackageprovidessupportforsynchronizat ID: 188600
Download Pdf The PPT/PDF document "2synchronicity-packageread................." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Package`synchronicity'August22,2018Version1.3.5TitleBoostMutexFunctionalityinRAuthorMichaelJ.Kanekane;plus;plus;@gma;il.c;om00;MaintainerMichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;ContactMichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;Importsmethods,bigmemory.sri,Rcpp,uuidLinkingToBH,RcppDescriptionBoostmutexfunctionalityinR.LicenseLGPL-2|ApacheLicense2.0URLhttp://www.bigmemory.orgLazyLoadyesSystemRequirementsC++11RoxygenNote6.1.0NeedsCompilationyesRepositoryCRANDate/Publication2018-08-2123:00:02UTCRtopicsdocumented:synchronicity-package...................................2attach.mutex.........................................3boost.mutex.........................................3boost.mutex-class......................................4boost.mutex.descriptor-class................................5describe...........................................6describe,boost.mutex-method................................6description..........................................7descriptor-class.......................................7is.timed,timeout......................................8lock.............................................91 2synchronicity-packageshared............................................10shared.name.........................................10uuid.............................................11Index12 synchronicity-packageThispackageprovidessupportforsynchronizationviamutexesandmayeventuallysupportinterprocesscommunication(ipc)andmes-sagepassing. DescriptionThispackageprovidessupportforsynchronizationviamutexesandmayeventuallysupportinter-processcommunication(ipc)andmessagepassing.DetailsPackage:synchronicityType:PackageVersion:1.3.4License:LGPL-3|ApacheLicense2.0OS_type:unixURL:http://www.bigmemory.orgLazyLoad:yesAuthor(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;ReferencesTheBigmemoryProject:http://www.bigmemory.org/.BoostInterprocessLibrary:http://www.boost.org/.Examples#Noexamplesareprovidedhere. attach.mutex3 attach.mutexAttachtoanexistingmutex. DescriptionAttachtoanexistingmutexusingeitheraleordescriptionobjectUsageattach.mutex(obj,...)##S4methodforsignature'character'attach.mutex(obj,...)##S4methodforsignature'boost.mutex.descriptor'attach.mutex(obj,...)Argumentsobjthedescriptorobject....otherargumentsneededbyattach.ValueAmutex. boost.mutexCreateaboost.mutexobject DescriptionThisfunctioncreatesaboost.mutexobject.Usageboost.mutex(sharedName=NULL,timeout=NULL,create=TRUE)ArgumentssharedNameThenameofthesharedresourcecorrespondingtothemutex.Bydefaultauni-versaluniqueidentierissupplied.timeoutTheamountoftime(inseconds)thatthemutexshouldtrytoattempttogetalock.Bydefaultnotimeoutissuppliedandthemutexwillattempttoacquirethelockindenitely.createShouldthemutexbecreatedorareweattachingtoanexistingon.DefaultisTRUE. 4boost.mutex-classValueThisfunctionreturnsaboost.mutexobject.Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;SeeAlsosynchronicityExamples#Createaboost.mutexobjectwithdefaultresourcenameandnotimeout.x=boost.mutex()rm(x)gc() boost.mutex-classClassboost.mutex DescriptionTheboost.mutexclassprovidesanRinterfacetothemutexfunctionalityimplementedintheBoostC++libraryObjectsfromtheClassUnlikemanyRobjects,objectsshouldnotbecreatedbycallsoftheformnew("boost.mutex",...).Thefunctionboost.mutex()isintendedfortheuser.SlotsisRead:Thisisusedinternallytomaintainstateinformationandshouldnotbetouchedbyauser.mutexInfoAddr:Objectofclass"externalptr"whichkeepstrackofinformationrelevanttothemutex.ExtendsClass"mutex",directly. boost.mutex.descriptor-class5Methodsdescribesignature(x="boost.mutex"):...is.timedsignature(m="boost.mutex"):...lock.sharedsignature(m="boost.mutex"):...locksignature(m="boost.mutex"):...shared.namesignature(m="boost.mutex"):...timeoutsignature(m="boost.mutex"):...unlocksignature(m="boost.mutex"):...Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;SeeAlsoboost.mutexExamplesshowClass("boost.mutex") boost.mutex.descriptor-classAnS4classholdingboost.mutexdescriptioninformation. DescriptionObjectsofclassdescriptionallowuserstoattachtoexistingmutexeswithinoracrossprocesses.Slotsdescriptionthelistofdescriptioninformation. 6describe,boost.mutex-method describeCreatedescriptorstomutexesandattach DescriptionThedescribefunctionreturnsinformationthatisneededtoconnecttoamutexfromanotherprocess.Thisconnectionisperformedbytheattach.mutexfunction.Usagedescribe(x)Argumentsxaboost.mutexobjectValueThedescribefunctionreturnsaboost.mutex.descriptorobject.Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;Examplesm=boost.mutex()mm=attach.mutex(describe(m))#Now,bothmandmmspecifythesamemutex.rm(m)rm(mm)gc() describe,boost.mutex-methodDescribetheboost.mutexobject DescriptionTheinformationrequiredtoattachtoanexistingmutexobject.Usage##S4methodforsignature'boost.mutex'describe(x) description7Argumentsxtheboostmutexobjecttodescribe. descriptionAccessorfordescriptorobjects DescriptionRetrievethelistofdescriptioninformationfromadescriptorobject.Usagedescription(x)##S4methodforsignature'descriptor'description(x)Argumentsxthedescriptorobject.Valuealistofdescriptioninformation. descriptor-classAnS4classholdingmutexdescriptioninformation. DescriptionObjectsofclassdescriptionallowuserstoattachtoexistingmutexeswithinoracrossprocesses.Slotsdescriptionthelistofdescriptioninformation. 8is.timed,timeout is.timed,timeoutTimeoutoperationsforboost.mutexobjects DescriptionTheis.timedfunctiontellsifaboost.mutexobjecthasatimeout.Thetimeoutfunctiontellshowlongamutexwillwaitforatimeout.Usageis.timed(m)timeout(m)Argumentsmaboost.mutexobjecttogettimeoutinformationforValueis.timedreturnsTRUEiftheobjecthasatimeoutandFALSEotherwise.Ifatimeouthasbeensettimeoutreturnsthenumberofsecondsaboost.mutexobjectwillattempttoacquirealockandNULLotherwise.Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;SeeAlsosynchronicityExamplesx=boost.mutex(timeout=5)y=boost.mutex()print(is.timed(x))print(is.timed(y))print(timeout(x))print(timeout(y)) lock9 lockLockandUnlockaMutex DescriptionThelockandunlockfunctionsallowausertospecifyexclusiveorsharedaccesstoaresource.Usagelock(m,...)lock.shared(m,...)unlock(m,...)unlock.shared(m,...)Argumentsmamutex....optionsassociatedwiththemutexbeingusedincludingblockwhichforcesthemutextoreturnimmediatelyaftertryingtoacquirealockDetailsAcalltolockgivesexclusiveaccesstoaresource;noothermutexmayacquirealock.Acalltotolock.sharedallowsothermutexestoacquireasharedlockontheresource.Whensharedlockiscalledwhileaexclusivelockhasbeenacquired,thesharedlockwillblockuntiltheexclusivelockisrelease.Likewise,ifanexclusivelockiscalledwhileasharedlockhasbeenacquired,theexclusivelockwillblockuntilthesharedlockisreleased.ValueThefunctionreturnsTRUEifthelockissuccessfullycalledandFALSEotherwiseExamplesm=boost.mutex()lock(m)#Somecodethatneedstobesynchronized...unlock(m) 10shared.name sharedIsitasharedmutex? DescriptionTellstheuserifamutexisasharedmutex.Ifitisnotthenitmustbeawrite(exclusive)mutex.Usageshared(m)##S4methodforsignature'boost.mutex'shared(m)ArgumentsmthemutexValueTRUEifthemutexisshared,FALSEotherwise. shared.nameThenameofamutex'ssharedresource DescriptionThisfunctionreturnsthesharedresourceassociatedwithaboost.mutexobject.Usageshared.name(m)Argumentsmaboost.mutexobjectValueAstringspecifyingthesharedresourceassociatedwiththegivenboost.mutexobject.Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00; uuid11SeeAlsosynchronicityExamplesx=boost.mutex()print(shared.name(x)) uuidCreateauniversaluniqueidentier. DescriptionThisfunctioncreatesanidentierthatwillbe(withhighprobability)uniqueonasinglemachineorgroupofmachines.Usageuuid()DetailsThefunctionsusestheboostuuidfunctionality.ValueAuniquestring.Author(s)MichaelJ.Kaneigm;mor;yaut;hors;@gma;il.c;om00;Referenceshttp://www.boost.org/doc/libs/1_42_0/libs/uuid/uuid.htmlExamplesprint(uuid())print(uuid()) IndexTopicclassesboost.mutex-class,4Topicmiscboost.mutex,3describe,6is.timed,timeout,8shared.name,10Topicprogrammingboost.mutex,3describe,6is.timed,timeout,8shared.name,10attach.mutex,3attach.mutex,boost.mutex.descriptor-method(attach.mutex),3attach.mutex,character-method(attach.mutex),3boost.mutex,3,5boost.mutex-class,4boost.mutex.descriptor-class,5describe,6describe,boost.mutex-method,6description,7description,descriptor-method(description),7descriptor-class,7is.timed(is.timed,timeout),8is.timed,timeout,8is.timed,boost.mutex-method(boost.mutex-class),4lock,9lock,boost.mutex-method(boost.mutex-class),4lock.shared,boost.mutex-method(boost.mutex-class),4mutex,4mutex-class(boost.mutex-class),4shared,10shared,boost.mutex-method(shared),10shared.name,10shared.name,boost.mutex-method(boost.mutex-class),4synchronicity,4,8,11synchronicity(synchronicity-package),2synchronicity-package,2timeout(is.timed,timeout),8timeout,boost.mutex-method(boost.mutex-class),4unlock(lock),9unlock,boost.mutex-method(boost.mutex-class),4uuid,1112