#include <application/application_shell.h>
#include <application/hoople_main.h>
+#include <basis/astring.h>
#include <basis/byte_array.h>
#include <basis/functions.h>
#include <basis/guards.h>
-#include <basis/astring.h>
#include <basis/mutex.h>
#include <configuration/application_configuration.h>
#include <loggers/console_logger.h>
using namespace timely;
using namespace unit_test;
+//////////////
+
// synchronization for logged messages to avoid overwriting on the console.
SAFE_STATIC(mutex, __loggers_lock, )
CLASS_EMERGENCY_LOG(program_wide_logger::get(), astring(s)); \
}
+//////////////
+
// the base log feature just prints the text to the console with no carriage return or extra flair.
// it does count up how many characters have been printed though, and does an EOL when it seems like it would be reasonable (80 chars-ish).
// note that this code makes no attempt to worry about any other printing that's happening; it has a very egocentric view of what's on the
}
//hmmm: may want to make the line size selectable, if we keep some version of the above line handling code around.
+//////////////
+
// protects our logging stream really, by keeping all the threads chomping at the bit rather
// than running right away. when this flag switches to true, then *bam* they're off.
class bool_scared_ya : public root_object {
};
SAFE_STATIC(bool_scared_ya, __threads_can_run_wild_and_free, (false));
+//////////////
+
// global constants...
//const int DEFAULT_RUN_TIME = 80 * MINUTE_ms;
const int MONKS_CLEANING_TIME = 10 * SECOND_ms;
// a very short duration for data to live.
+//////////////
+
// global objects...
SAFE_STATIC(chaos, _rando, );
entity_data_bin binger(MAXIMUM_DATA_PER_ENTITY);
+//////////////
+
octopus_request_id create_request_id()
{
// test the basic filling of the values in an entity.
return req_id;
}
+//////////////
+
// this thread creates new items for the entity data bin.
// also known as the adder.
class ballot_box_stuffer : public ethread
}
};
+//////////////
+
// this class makes sure the deadwood is cleaned out of the entity bin.
class obsessive_compulsive : public ethread
{
}
};
+//////////////
+
// this thread will destroy all data in the bins while cleaning furiously.
class monk_the_detective : public ethread
{
return 0;
}
+//////////////
+
HOOPLE_MAIN(test_entity_data_bin_threaded, )