Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
bc5555b8
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bc5555b8
编写于
7月 27, 2018
作者:
M
minqiyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change git apply patches to cp because third_party is not managed in Paddle repo
上级
8f18f4d1
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
1 addition
and
56 deletion
+1
-56
cmake/external/grpc.cmake
cmake/external/grpc.cmake
+1
-1
patches/grpc/fix_too_early_destory.patch
patches/grpc/fix_too_early_destory.patch
+0
-47
python/paddle/reader/decorator.py
python/paddle/reader/decorator.py
+0
-8
未找到文件。
cmake/external/grpc.cmake
浏览文件 @
bc5555b8
...
...
@@ -50,7 +50,7 @@ ExternalProject_Add(
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_IN_SOURCE 1
PATCH_COMMAND
git apply
${
PADDLE_SOURCE_DIR
}
/patches/grpc/fix_too_early_destory.patc
h
PATCH_COMMAND
cp
${
PADDLE_SOURCE_DIR
}
/patches/grpc/grpc_library.h
${
GRPC_SOURCES_DIR
}
/include/grpcpp/impl/codegen/grpc_library.h && cp
${
PADDLE_SOURCE_DIR
}
/patches/grpc/completion_queue.h
${
GRPC_SOURCES_DIR
}
/include/grpcpp/impl/codegen/completion_queue.
h
# NOTE(yuyang18):
# Disable -Werror, otherwise the compile will fail in MacOS.
# It seems that we cannot configure that by make command.
...
...
patches/grpc/fix_too_early_destory.patch
已删除
100644 → 0
浏览文件 @
8f18f4d1
diff --git a/include/grpcpp/impl/codegen/completion_queue.h b/include/grpcpp/impl/codegen/completion_queue.h
index 80c7c41982..3f7d8a7714 100644
--- a/include/grpcpp/impl/codegen/completion_queue.h
+++ b/include/grpcpp/impl/codegen/completion_queue.h
@@ -32,6 +32,8 @@
#ifndef GRPCPP_IMPL_CODEGEN_COMPLETION_QUEUE_H
#define GRPCPP_IMPL_CODEGEN_COMPLETION_QUEUE_H
+#include <typeinfo>
+
#include <grpc/impl/codegen/atm.h>
#include <grpcpp/impl/codegen/completion_queue_tag.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
@@ -106,7 +108,9 @@
class CompletionQueue : private GrpcLibraryCodegen {
/// Destructor. Destroys the owned wrapped completion queue / instance.
~CompletionQueue() {
- g_core_codegen_interface->grpc_completion_queue_destroy(cq_);
+ if (typeid(*g_core_codegen_interface).hash_code() != typeid(CoreCodegenInterface).hash_code()) {
+ g_core_codegen_interface->grpc_completion_queue_destroy(cq_);
+ }
}
/// Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT.
diff --git a/include/grpcpp/impl/codegen/grpc_library.h b/include/grpcpp/impl/codegen/grpc_library.h
index 17c904d71a..a092b2204d 100644
--- a/include/grpcpp/impl/codegen/grpc_library.h
+++ b/include/grpcpp/impl/codegen/grpc_library.h
@@ -19,6 +19,8 @@
#ifndef GRPCPP_IMPL_CODEGEN_GRPC_LIBRARY_H
#define GRPCPP_IMPL_CODEGEN_GRPC_LIBRARY_H
+#include <typeinfo>
+
#include <grpcpp/impl/codegen/core_codegen_interface.h>
namespace grpc {
@@ -47,7 +49,8 @@
class GrpcLibraryCodegen {
}
}
virtual ~GrpcLibraryCodegen() {
- if (grpc_init_called_) {
+ if (grpc_init_called_ &&
+ typeid(*g_glip).hash_code() != typeid(GrpcLibraryInterface).hash_code()) {
GPR_CODEGEN_ASSERT(g_glip &&
"gRPC library not initialized. See "
"grpc::internal::GrpcLibraryInitializer.");
python/paddle/reader/decorator.py
浏览文件 @
bc5555b8
...
...
@@ -325,14 +325,6 @@ def xmap_readers(mapper, reader, process_num, buffer_size, order=False):
else
:
yield
sample
assert
finish
==
process_num
for
w
in
workers
:
print
(
'join worker: '
,
w
)
print
(
'join worker: '
,
w
.
is_alive
())
w
.
join
()
print
(
'join worker: '
,
w
.
is_alive
())
del
workers
return
xreader
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录