Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
08c32bc9
F
fsharp
项目概览
dotNET Platform
/
fsharp
大约 1 年 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
08c32bc9
编写于
10月 23, 2020
作者:
W
Will Smith
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Lock per TP instance
上级
91af6e8d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
14 deletion
+6
-14
src/fsharp/CompilerImports.fs
src/fsharp/CompilerImports.fs
+2
-6
src/fsharp/ExtensionTyping.fs
src/fsharp/ExtensionTyping.fs
+1
-1
src/fsharp/tainted.fs
src/fsharp/tainted.fs
+3
-5
src/fsharp/tainted.fsi
src/fsharp/tainted.fsi
+0
-2
未找到文件。
src/fsharp/CompilerImports.fs
浏览文件 @
08c32bc9
...
...
@@ -707,11 +707,7 @@ type TcImportsSafeDisposal
if
verbose
then
dprintf
"disposing of TcImports, %d binaries
\n
"
disposeActions
.
Count
#
if
!
NO_EXTENSIONTYPING
async
{
let
actions
=
disposeTypeProviderActions
if
actions
.
Count
>
0
then
TypeProviderLock
.
Singleton
.
AcquireLock
(
fun
_
->
for
action
in
actions
do
action
()
)
}
|>
Async
.
Start
// Make this async so we do not block dispose
for
action
in
disposeTypeProviderActions
do
action
()
#
endif
for
action
in
disposeActions
do
action
()
...
...
@@ -1258,7 +1254,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
for
provider
in
providers
do
tcImportsStrong
.
AttachDisposeTypeProviderAction
(
fun
()
->
try
provider
.
PUntaintNoFailure
(
fun
x
->
x
).
Dispose
()
provider
.
PUntaintNoFailure
(
fun
x
->
x
.
Dispose
()
)
with
e
->
()
)
...
...
src/fsharp/ExtensionTyping.fs
浏览文件 @
08c32bc9
...
...
@@ -97,7 +97,7 @@ module internal ExtensionTyping =
// reporting errors.
let
protect
f
=
try
TypeProviderLock
.
Singleton
.
AcquireLock
(
fun
_
->
f
()
)
f
(
)
with
err
->
let
e
=
StripException
(
StripException
err
)
raise
(
TypeProviderError
(
FSComp
.
SR
.
etTypeProviderConstructorException
(
e
.
Message
),
typeProviderImplementationType
.
FullName
,
m
))
...
...
src/fsharp/tainted.fs
浏览文件 @
08c32bc9
...
...
@@ -17,8 +17,6 @@ type internal TypeProviderToken() = interface LockToken
type
internal
TypeProviderLock
()
=
inherit
Lock
<
TypeProviderToken
>()
static
member
val
Singleton
=
TypeProviderLock
()
type
internal
TypeProviderError
(
errNum
:
int
,
...
...
@@ -78,7 +76,7 @@ type internal TypeProviderError
for
msg
in
errors
do
f
(
new
TypeProviderError
(
errNum
,
tpDesignation
,
m
,
[
msg
],
typeNameContext
,
methodNameContext
))
type
TaintedContext
=
{
TypeProvider
:
ITypeProvider
;
TypeProviderAssemblyRef
:
ILScopeRef
}
type
TaintedContext
=
{
TypeProvider
:
ITypeProvider
;
TypeProviderAssemblyRef
:
ILScopeRef
;
Lock
:
TypeProviderLock
}
[<
NoEquality
>][<
NoComparison
>]
type
internal
Tainted
<
'
T
>
(
context
:
TaintedContext
,
value
:
'
T
)
=
...
...
@@ -97,7 +95,7 @@ type internal Tainted<'T> (context : TaintedContext, value : 'T) =
member
this
.
Protect
f
(
range
:
range
)
=
try
TypeProviderLock
.
Singleton
.
AcquireLock
(
fun
_
->
f
value
)
context
.
Lock
.
AcquireLock
(
fun
_
->
f
value
)
with
|
:?
TypeProviderError
->
reraise
()
|
:?
AggregateException
as
ae
->
...
...
@@ -152,7 +150,7 @@ type internal Tainted<'T> (context : TaintedContext, value : 'T) =
static
member
CreateAll
(
providerSpecs
:
(
ITypeProvider
*
ILScopeRef
)
list
)
=
[
for
(
tp
,
nm
)
in
providerSpecs
do
yield
Tainted
<_>({
TypeProvider
=
tp
;
TypeProviderAssemblyRef
=
nm
},
tp
)
]
yield
Tainted
<_>({
TypeProvider
=
tp
;
TypeProviderAssemblyRef
=
nm
;
Lock
=
TypeProviderLock
()
},
tp
)
]
member
this
.
OfType
<
'
U
>
()
=
match
box
value
with
...
...
src/fsharp/tainted.fsi
浏览文件 @
08c32bc9
...
...
@@ -20,8 +20,6 @@ type internal TypeProviderToken =
type
internal
TypeProviderLock
=
inherit
Lock
<
TypeProviderToken
>
static
member
Singleton
:
TypeProviderLock
/// Stores and transports aggregated list of errors reported by the type provider
type
internal
TypeProviderError
=
inherit
System
.
Exception
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录