Ignore:
Timestamp:
Dec 8, 2025, 11:29:33 AM (2 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
79ba50c
Parents:
8f448e0 (diff), 79ec8c3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'refs/remotes/origin/master'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/examples/boundedBufferTHREAD.cfa

    r8f448e0 r5e0b6657  
    1010// Created On       : Wed Apr 18 22:52:12 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan 16 23:09:43 2020
    13 // Update Count     : 25
     12// Last Modified On : Wed Nov  5 08:05:24 2025
     13// Update Count     : 28
    1414//
    1515
    16 #include <stdlib.hfa>                                                                   // random
    1716#include <fstream.hfa>
    1817#include <kernel.hfa>
     
    6564void main( Producer & prod ) with( prod ) {
    6665        for ( i; 1 ~= N ) {
    67                 yield( random( 5 ) );
     66                yield( prng( 5 ) );
    6867                insert( buffer, 1 );
    6968        } // for
     
    8180        sum = 0;
    8281        for () {
    83                 yield( random( 5 ) );
     82                yield( prng( 5 ) );
    8483                int item = remove( buffer );
    8584          if ( item == Sentinel ) break;                                        // sentinel ?
     
    101100        processor p;
    102101
    103         //srandom( getpid() );
    104         srandom( 1003 );
     102        set_seed( 1003 );
    105103
    106104        for ( i; Cons ) {                                                                       // create consumers
    107                 cons[i] = new( &buffer, sums[i] );
     105                cons[i] = new( &buffer, sums[i] );                              // NEW CANNOT HANDLE BUFFER REFERENCE
    108106        } // for
    109107        for ( i; Prods ) {                                                                      // create producers
Note: See TracChangeset for help on using the changeset viewer.