// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_0 || MOBILE
+#if NET_4_0
using System.Collections.Generic;
using System.Diagnostics;
return id;
}
}
+
+ internal static bool IsDefault {
+ get {
+ return currentScheduler == null || currentScheduler == defaultScheduler;
+ }
+ }
public virtual int MaximumConcurrencyLevel {
get {
- return Environment.ProcessorCount;
+ return int.MaxValue;
}
}
protected abstract bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued);
- internal bool RunInline (Task task)
+ internal bool RunInline (Task task, bool taskWasPreviouslyQueued)
{
- if (!TryExecuteTaskInline (task, false))
+ if (!TryExecuteTaskInline (task, taskWasPreviouslyQueued))
return false;
if (!task.IsCompleted)