tgb(List)
tgb(Ideal)
Threaded Gr\"obner basis uses Tasks to compute a Gr\"obner basis of I or ideal L using $n$ threads.




The keys of the hashtable are meaningful; for example, the polynomial with key ((0,2),1) in the hashtable tgb(L,n) is the remainder upon division of the Spolynomial $(g, I_1)$, where $g$ is calculated from the Spair $(I_0, I_2)$. For this reason, we say that the key communicates the "lineage" of the resulting polynomial. (See ThreadedGB.)
Note that the keys in the hash table are strings, and the keys of input polynomials are 0..#L, as in the following example.

Some may be curious how tgb works.
The starting basis $L$ (the input list L or L=gens I) populates the entries numbered $0$ through $n1$ of a mutable hash table $G$, where $n$ is the length of $L$. The method creates all possible Spolynomials of $L$ and schedules their reduction with respect to $G$ as tasks. Throughout the computation, every nonzero remainder added to the basis is added to $G$ with its lineage as the key. Each such remainder also triggers the creation of Spolynomials using it and every element in $G$ and scheduling the reduction thereof as additional tasks. The process is done when there are no remaining tasks.
There is a way to track the tasks being created by turning on the option Verbose.





In the example above, the Spolynomial S(f0,f1) didn't reduce to zero, hence the remainder was added to the output with key (0,1). The additional two Spolynomials reduced and the process ended.
Due to threads running in parallel, it can happen that there are redundant elements in the final Gr\"obner basis. However these can be easily removed using minimize, for example.
Also, allowableThreads needs to be set to an integer larger than 1, prior to calling tgb. Otherwise, errors may occur. It may be a good idea to reset allowableThreads to 1 after the threaded computations are done.
The object tgb is a method function with options.