→ index of namespace default
 
→ index of project core
 
→ index of module core

Class core.SharedBuffer


Synopsis: A shared memory buffer.

  Base classes:
  Methods: Description:


Use →peekI32, →pokeI32, →ringReadBuffer, →ringWriteBuffer to atomatically read / write 32bit integers.
Ring buffer sizes must be dword-aligned (but support un-aligned read/write offsets and sizes).


 
→ top of page

Method allocSharedMemory
Create shared memory key (name) and allocate the given number of bytes.
Signature
allocSharedMemory(intsize)
 :boolean
Arguments
intsize–How many bytes to allocate
Returns
boolean–true if the shared memory has been created successfully, false otherwise.

 
→ top of page
Method allocSharedMemoryByKey
Allocate shared memory using the given key (name).
Signature
allocSharedMemoryByKey(Stringkey,
  intsize 
  )  
 :boolean
Arguments
Stringkey–Name of the shared memory area
intsize–Size of the shared memory area (number of bytes)
Returns
boolean–true if the shared memory has been created successfully, false otherwise

 
→ top of page
Method getSharedMemoryKey
Return a (non-deletable) reference to the shared memory key (name).
Signature
getSharedMemoryKey():String
Returns
String–(non-deletable) reference to the shared memory key (name).

 
→ top of page
Method isOpen
Check if shared memory handle is valid.
Signature
isOpen():boolean
Returns
boolean–true when handle is valid

 
→ top of page
Method isOpen
Check if shared memory is owned by this process.
Signature
isOpen():boolean
Returns
boolean–

 
→ top of page
Method lock
Lock shared buffer.
Signature
lock(floattimeoutMS)
 :boolean
Arguments
floattimeoutMS–Time out in milliseconds (0=return immediately)
Returns
boolean–true when buffer has been locked, false when an error or timeout occured

 
→ top of page
Method unlock
Unlock shared buffer.
Signature
unlock()

 
→ top of page
Method visitSharedMemory
Open an already existing shared memory area using the given key (name) and size.
Signature
visitSharedMemory(Stringkey,
  intsize 
  )  
Arguments
Stringkey–Name of the shared memory area
intsize–Size of the shared memory area (number of bytes)

 
→ top of page
 

Project Modules:core 
Project Classes:Boolean , Buffer , Byte , Class , ClassArray , Condition , Configuration , Double , DummyStream , Envelope , Event , Exception , File , Float , FloatArray , FloatArray128 , FloatArray16 , FloatArray32 , FloatArray64 , FloatArray8 , Function , HashTable , IntArray , IntArray128 , IntArray16 , IntArray32 , IntArray64 , IntArray8 , Integer , LFSR , LFSR_NR , List , ListNode , Long , Mailbox , Mutex , Object , ObjectArray , PakFile , PointerArray , Pool , Process , Script , SharedBuffer , Short , Stack , StdErrStream , StdInStream , StdOutStream , Stream , String , String128 , String16 , String32 , String64 , String8 , StringArray , StringIterator , Thread , Time , TKS , TreeNode , UnsignedByte , UnsignedInteger , UnsignedLong , UnsignedShort , Value , ValueArray , Variable 
Project Functions:ceil , exit , floor , GetCurrentThread , getenv , lcchar , mathAbsMaxf , mathAbsMinf , mathAbsMini , mathAbsMini , mathCerpf , mathClampf , mathClampi , mathDistancePointPlane2d , mathFoldf , mathFoldi , mathGCD , mathLerpCyclicf , mathLerpf , mathMaxf , mathMaxi , mathMinf , mathMini , mathNextCyclicf , mathPowerf , mathPowerfC , mathPoweri , mathSerpf , mathSmoothStepf , mathSmoothStepNf , mathWrapf , mathWrapi , milliSeconds , milliSecondsDouble , psystem , putenv , srand , system , ucchar 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Tue, 3/Mar/2026 18:10:17