Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2b139c00
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2b139c00
编写于
2月 17, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove SynchronizableObjectsRegistry
上级
eba488b4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
57 deletion
+0
-57
src/vs/platform/test/common/nullThreadService.ts
src/vs/platform/test/common/nullThreadService.ts
+0
-4
src/vs/platform/thread/common/mainThreadService.ts
src/vs/platform/thread/common/mainThreadService.ts
+0
-4
src/vs/platform/thread/common/pluginHostThreadService.ts
src/vs/platform/thread/common/pluginHostThreadService.ts
+0
-8
src/vs/platform/thread/common/thread.ts
src/vs/platform/thread/common/thread.ts
+0
-1
src/vs/platform/thread/common/threadService.ts
src/vs/platform/thread/common/threadService.ts
+0
-32
src/vs/platform/thread/common/workerThreadService.ts
src/vs/platform/thread/common/workerThreadService.ts
+0
-8
未找到文件。
src/vs/platform/test/common/nullThreadService.ts
浏览文件 @
2b139c00
...
...
@@ -40,10 +40,6 @@ export class NullThreadService extends abstractThreadService.AbstractThreadServi
return
target
.
apply
(
obj
,
params
);
}
ensureWorkers
():
void
{
// Nothing to do
}
addStatusListener
(
listener
:
IThreadServiceStatusListener
):
void
{
// Nothing to do
}
...
...
src/vs/platform/thread/common/mainThreadService.ts
浏览文件 @
2b139c00
...
...
@@ -12,7 +12,6 @@ import Platform = require('vs/base/common/platform');
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
Timer
=
require
(
'
vs/base/common/timer
'
);
import
remote
=
require
(
'
vs/base/common/remote
'
);
import
{
readThreadSynchronizableObjects
}
from
'
vs/platform/thread/common/threadService
'
;
import
{
SyncDescriptor0
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
IThreadService
,
IThreadServiceStatusListener
,
IThreadSynchronizableObject
,
ThreadAffinity
,
IThreadServiceStatus
}
from
'
vs/platform/thread/common/thread
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
...
...
@@ -65,9 +64,6 @@ export class MainThreadService extends abstractThreadService.AbstractThreadServi
// Not cancelable
});
// Register all statically instantiated synchronizable objects
readThreadSynchronizableObjects
().
forEach
((
obj
)
=>
this
.
registerInstance
(
obj
));
// If nobody asks for workers to be created in 5s, the workers are created automatically
TPromise
.
timeout
(
MainThreadService
.
MAXIMUM_WORKER_CREATION_DELAY
).
then
(()
=>
this
.
ensureWorkers
());
}
...
...
src/vs/platform/thread/common/pluginHostThreadService.ts
浏览文件 @
2b139c00
...
...
@@ -9,7 +9,6 @@ import remote = require('vs/base/common/remote');
import
descriptors
=
require
(
'
vs/platform/instantiation/common/descriptors
'
);
import
abstractThreadService
=
require
(
'
./abstractThreadService
'
);
import
{
readThreadSynchronizableObjects
}
from
'
vs/platform/thread/common/threadService
'
;
import
{
IThreadService
,
IThreadSynchronizableObject
,
ThreadAffinity
,
IThreadServiceStatusListener
}
from
'
vs/platform/thread/common/thread
'
;
export
class
PluginHostThreadService
extends
abstractThreadService
.
AbstractThreadService
implements
IThreadService
{
...
...
@@ -20,9 +19,6 @@ export class PluginHostThreadService extends abstractThreadService.AbstractThrea
super
(
false
);
this
.
_remoteCom
=
remoteCom
;
this
.
_remoteCom
.
setManyHandler
(
this
);
// Register all statically instantiated synchronizable objects
readThreadSynchronizableObjects
().
forEach
((
obj
)
=>
this
.
registerInstance
(
obj
));
}
MainThread
(
obj
:
IThreadSynchronizableObject
<
any
>
,
methodName
:
string
,
target
:
Function
,
params
:
any
[]):
TPromise
<
any
>
{
...
...
@@ -41,10 +37,6 @@ export class PluginHostThreadService extends abstractThreadService.AbstractThrea
return
target
.
apply
(
obj
,
params
);
}
ensureWorkers
():
void
{
// Nothing to do
}
addStatusListener
(
listener
:
IThreadServiceStatusListener
):
void
{
// Nothing to do
}
...
...
src/vs/platform/thread/common/thread.ts
浏览文件 @
2b139c00
...
...
@@ -23,7 +23,6 @@ export interface IThreadService {
// --- BEGIN deprecated methods
isInMainThread
:
boolean
;
ensureWorkers
():
void
;
addStatusListener
(
listener
:
IThreadServiceStatusListener
):
void
;
removeStatusListener
(
listener
:
IThreadServiceStatusListener
):
void
;
...
...
src/vs/platform/thread/common/threadService.ts
浏览文件 @
2b139c00
...
...
@@ -87,35 +87,3 @@ export function EverywhereAttr(type: Function, target: Function): void {
return
findThreadService
(
this
).
Everywhere
(
this
,
methodName
,
target
,
param
);
};
}
class
SynchronizableObjectsRegistry
{
private
_list
:
thread
.
IThreadSynchronizableObject
<
any
>
[]
=
[];
constructor
()
{
this
.
_list
=
[];
}
public
register
(
obj
:
thread
.
IThreadSynchronizableObject
<
any
>
):
void
{
this
.
_list
.
push
(
obj
);
}
public
read
():
thread
.
IThreadSynchronizableObject
<
any
>
[]
{
return
this
.
_list
;
}
}
export
const
Extensions
=
{
SynchronizableObjects
:
'
SynchronizableObjects
'
};
Platform
.
Registry
.
add
(
Extensions
.
SynchronizableObjects
,
new
SynchronizableObjectsRegistry
());
export
function
registerThreadSynchronizableObject
(
obj
:
thread
.
IThreadSynchronizableObject
<
any
>
):
void
{
let
registry
=
<
SynchronizableObjectsRegistry
>
Platform
.
Registry
.
as
(
Extensions
.
SynchronizableObjects
);
registry
.
register
(
obj
);
}
export
function
readThreadSynchronizableObjects
():
thread
.
IThreadSynchronizableObject
<
any
>
[]
{
let
registry
=
<
SynchronizableObjectsRegistry
>
Platform
.
Registry
.
as
(
Extensions
.
SynchronizableObjects
);
return
registry
.
read
();
}
\ No newline at end of file
src/vs/platform/thread/common/workerThreadService.ts
浏览文件 @
2b139c00
...
...
@@ -5,7 +5,6 @@
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
readThreadSynchronizableObjects
}
from
'
./threadService
'
;
import
abstractThreadService
=
require
(
'
vs/platform/thread/common/abstractThreadService
'
);
import
remote
=
require
(
'
vs/base/common/remote
'
);
import
{
SyncDescriptor0
}
from
'
vs/platform/instantiation/common/descriptors
'
;
...
...
@@ -28,9 +27,6 @@ export class WorkerThreadService extends abstractThreadService.AbstractThreadSer
this
.
_remoteCom
.
setManyHandler
(
this
);
this
.
_publisher
=
workerPublisher
;
// Register all statically instantiated synchronizable objects
readThreadSynchronizableObjects
().
forEach
((
obj
)
=>
this
.
registerInstance
(
obj
));
}
private
_handleRequest
(
identifier
:
string
,
memberName
:
string
,
args
:
any
[]):
TPromise
<
any
>
{
...
...
@@ -96,10 +92,6 @@ export class WorkerThreadService extends abstractThreadService.AbstractThreadSer
return
target
.
apply
(
obj
,
params
);
}
ensureWorkers
():
void
{
// Nothing to do
}
addStatusListener
(
listener
:
IThreadServiceStatusListener
):
void
{
// Nothing to do
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录