Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Commit

Permalink
Getting closer to merging Task<T> with Promise<T>.
Browse files Browse the repository at this point in the history
Tweaks to leverage ObjectPools better.
Fixed LinkedNodeList removeNode method: Wasn't clearing previous and next if removed.
  • Loading branch information
electricessence committed May 26, 2016
1 parent e68cf85 commit 61db330
Show file tree
Hide file tree
Showing 66 changed files with 318 additions and 645 deletions.
3 changes: 2 additions & 1 deletion dist/commonjs/System/Collections/Dictionaries/Dictionary.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion dist/commonjs/System/Collections/LinkedNodeList.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commonjs/System/Collections/LinkedNodeList.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/commonjs/System/Disposable/ObjectPool.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import { DisposableBase } from "./DisposableBase";
export declare class ObjectPool<T> extends DisposableBase {
private _maxSize;
private _generator;
private _recycler;
private _pool;
private _trimmer;
private _flusher;
private _autoFlusher;
private _localAbsMaxSize;
autoClearTimeout: number;
constructor(_maxSize: number, _generator: () => T);
constructor(_maxSize: number, _generator: (...args: any[]) => T, _recycler?: (o: T) => void);
maxSize: number;
count: number;
protected _trim(): void;
Expand Down
15 changes: 9 additions & 6 deletions dist/commonjs/System/Disposable/ObjectPool.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commonjs/System/Disposable/ObjectPool.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/commonjs/System/Promises/Promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export declare class Promise<T> extends Resolvable<T> {
resolve(result?: T, throwIfSettled?: boolean): void;
reject(error: any, throwIfSettled?: boolean): void;
}
export declare class LazyResolved<T> extends Resolved<T> {
export declare class Task<T> extends Resolved<T> {
private _factory;
constructor(_factory: Func<T>);
protected _onDispose(): void;
Expand All @@ -61,8 +61,8 @@ export declare class LazyResolved<T> extends Resolved<T> {
protected getError(): any;
then<TResult>(onFulfilled: Promise.Fulfill<T, TResult>, onRejected?: Promise.Reject<TResult>): PromiseBase<TResult>;
thenThis<TResult>(onFulfilled: Promise.Fulfill<T, TResult>, onRejected?: Promise.Reject<TResult>): PromiseBase<T>;
resolve(): PromiseBase<T>;
isResolved: boolean;
resolve(): Task<T>;
isCompleted: boolean;
}
export declare class LazyPromise<T> extends Promise<T> {
private _resolver;
Expand Down Expand Up @@ -99,7 +99,7 @@ export declare module Promise {
function resolve<T>(value: T | PromiseLike<T>): PromiseBase<T>;
function reject<T>(reason: T): PromiseBase<T>;
module lazy {
function resolve<T>(factory: Func<T>): LazyResolved<T>;
function resolve<T>(factory: Func<T>): Task<T>;
function pending<T>(resolver: Promise.Executor<T>): LazyPromise<T>;
}
function wrap<T>(target: PromiseLike<T>): PromiseBase<T>;
Expand Down
58 changes: 30 additions & 28 deletions dist/commonjs/System/Promises/Promise.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commonjs/System/Promises/Promise.js.map

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions dist/commonjs/System/Tasks/TaskHandler.d.ts

This file was deleted.

52 changes: 0 additions & 52 deletions dist/commonjs/System/Tasks/TaskHandler.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/commonjs/System/Tasks/TaskHandler.js.map

This file was deleted.

Loading

0 comments on commit 61db330

Please sign in to comment.