<commit_before>#ifndef RUST_SCHEDULER_H
#define RUST_SCHEDULER_H

#include "rust_internal.h"

class rust_scheduler : public kernel_owned<rust_scheduler> {
    // FIXME: Make these private
public:
    rust_kernel *kernel;
    rust_srv *srv;
    rust_env *env;
private:
    lock_and_signal lock;
    array_list<rust_task_thread *> threads;
    randctx rctx;
    const size_t num_threads;
    int rval;

    void create_task_threads();
    void destroy_task_threads();

    rust_task_thread *create_task_thread(int id);
    void destroy_task_thread(rust_task_thread *thread);

public:
    rust_scheduler(rust_kernel *kernel, rust_srv *srv, size_t num_threads);
    ~rust_scheduler();

    void start_task_threads();
    void kill_all_tasks();
    rust_task_id create_task(rust_task *spawner,
			     const char *name,
			     size_t init_stack_sz);
    rust_task_id create_task(rust_task *spawner, const char *name);
    void exit();<commit_msg>rt: Remove rust_scheduler::rval. Unused<commit_after>#ifndef RUST_SCHEDULER_H
#define RUST_SCHEDULER_H

#include "rust_internal.h"

class rust_scheduler : public kernel_owned<rust_scheduler> {
    // FIXME: Make these private
public:
    rust_kernel *kernel;
    rust_srv *srv;
    rust_env *env;
private:
    lock_and_signal lock;
    array_list<rust_task_thread *> threads;
    randctx rctx;
    const size_t num_threads;

    void create_task_threads();
    void destroy_task_threads();

    rust_task_thread *create_task_thread(int id);
    void destroy_task_thread(rust_task_thread *thread);

public:
    rust_scheduler(rust_kernel *kernel, rust_srv *srv, size_t num_threads);
    ~rust_scheduler();

    void start_task_threads();
    void kill_all_tasks();
    rust_task_id create_task(rust_task *spawner,
			     const char *name,
			     size_t init_stack_sz);
    rust_task_id create_task(rust_task *spawner, const char *name);
    void exit();
{'fraction_non_alphanumeric': 0.0859704641350211, 'fraction_numerical': 0.0, 'mean_word_length': 4.313725490196078, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3184550', 'n_tokens_mistral': 673, 'n_tokens_neox': 656, 'n_words': 142}