Changeset ce98816


Ignore:
Timestamp:
Jun 4, 2022, 2:43:16 PM (23 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
f11296a
Parents:
c4b10e2
Message:

Stats printer now uses a condition variable to sleep so it exists immediately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/main.cfa

    rc4b10e2 rce98816  
    1616#include <fstream.hfa>
    1717#include <kernel.hfa>
     18#include <locks.hfa>
    1819#include <iofwd.hfa>
    1920#include <stats.hfa>
     
    3940        Worker * workers;
    4041        int worker_cnt;
     42        condition_variable(fast_block_lock) var;
    4143};
    4244
     
    5759                or else {}
    5860
    59                 sleep(10`s);
     61                wait(this.var, 10`s);
    6062
    6163                print_stats_now( *active_cluster(), CFA_STATS_READY_Q | CFA_STATS_IO );
     
    342344                        for(i; options.clopts.nclusters) {
    343345                                StatsPrinter * p = cl[i].prnt;
    344                                 if(p) join(*p);
     346                                if(p) {
     347                                        notify_one(p->var);
     348                                        join(*p);
     349                                }
    345350                        }
    346351                        sout | "done";
Note: See TracChangeset for help on using the changeset viewer.