Overhaul the lthread_prints_ buffer.

This commit is contained in:
2026-02-09 17:03:22 -05:00
parent bf7cb9d258
commit 8fc4a3b94c
3 changed files with 69 additions and 79 deletions

View File

@@ -358,10 +358,12 @@ public:
// cleared.
//
void clear_lthread_state();
void open_lthread_state(int64_t actor_id, int64_t place_id, int64_t thread_id, bool ppool, bool prints);
void close_lthread_state();
void open_lthread_state(int64_t actor_id, int64_t place_id, int64_t thread_id, bool ppool);
std::ostream *lthread_print_stream() const;
std::ostream *lthread_print_stream() { return &lthread_prints_; }
void lthread_prints_to_printbuffer();
void lthread_prints_to_dprint();
// Set a lua global variable.
//
@@ -670,7 +672,7 @@ private:
int64_t lthread_place_id_;
int64_t lthread_thread_id_;
int64_t lthread_use_ppool_;
std::unique_ptr<eng::ostringstream> lthread_prints_;
eng::ostringstream lthread_prints_;
friend class Tangible;
friend int lfn_tangible_animate(lua_State *L);