<commit_before>package schedulers

import (
	"runtime"
	"time"
)

type Runnable func()

type job struct {
	run   Runnable
	delay time.Duration
}

type Scheduler interface {
	Start()
	Stop()
	Schedule(run Runnable)
	ScheduleAt(run Runnable, delay time.Duration)
}

var (
	Computation Scheduler
	IO          Scheduler
)

func init() {
	Computation = newEventLoopScheduler(maxParallelism())
}

func maxParallelism() int {
	maxProcs := runtime.GOMAXPROCS(0)
	numCpu := runtime.NumCPU()
	if maxProcs < numCpu {
		return maxProcs
	}
	return numCpu
}<commit_msg>declared cached thread pool as IO scheduler.<commit_after>package schedulers

import (
	"runtime"
	"time"
)

type Runnable func()

type job struct {
	run   Runnable
	delay time.Duration
}

type Scheduler interface {
	Start()
	Stop()
	Schedule(run Runnable)
	ScheduleAt(run Runnable, delay time.Duration)
}

var (
	Computation Scheduler
	IO          Scheduler
)

func init() {
	Computation = newEventLoopScheduler(maxParallelism())
	IO = newThreadPoolScheduler(time.Second * 120)
}

func maxParallelism() int {
	maxProcs := runtime.GOMAXPROCS(0)
	numCpu := runtime.NumCPU()
	if maxProcs < numCpu {
		return maxProcs
	}
	return numCpu
}
{'fraction_non_alphanumeric': 0.095878889823381, 'fraction_numerical': 0.004205214465937763, 'mean_word_length': 4.242290748898679, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7624212', 'n_tokens_mistral': 432, 'n_tokens_neox': 425, 'n_words': 107}