+bool Promise::thread_was_available(thread_id_t tid) const
+{
+ unsigned int id = id_to_int(tid);
+ if (id >= was_available_thread.size())
+ return false;
+ return was_available_thread[id];
+}
+
+/**
+ * @brief Get an upper bound on the number of available threads
+ *
+ * Gets an upper bound on the number of threads in the available threads set,
+ * useful for iterating over "thread_is_available()".
+ *
+ * @return The upper bound
+ */
+unsigned int Promise::max_available_thread_idx() const
+{
+ return available_thread.size();
+}
+