Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
CallJvm
提交
91c6495f
C
CallJvm
项目概览
OpenDocCN
/
CallJvm
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
CallJvm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
91c6495f
编写于
11月 05, 2019
作者:
X
xwhqsj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update threadpool.cpp
上级
73a559f1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
50 addition
and
10 deletion
+50
-10
callJvmThreadpool/.idea/inspectionProfiles/Project_Default.xml
...vmThreadpool/.idea/inspectionProfiles/Project_Default.xml
+6
-0
callJvmThreadpool/.idea/vcs.xml
callJvmThreadpool/.idea/vcs.xml
+6
-0
callJvmThreadpool/.idea/workspace.xml
callJvmThreadpool/.idea/workspace.xml
+19
-1
callJvmThreadpool/cmake-build-debug/CMakeFiles/main.dir/threadpool.cpp.o
...ol/cmake-build-debug/CMakeFiles/main.dir/threadpool.cpp.o
+0
-0
callJvmThreadpool/cmake-build-debug/CMakeFiles/main.dir/tpool.cpp.o
...eadpool/cmake-build-debug/CMakeFiles/main.dir/tpool.cpp.o
+0
-0
callJvmThreadpool/cmake-build-debug/main
callJvmThreadpool/cmake-build-debug/main
+0
-0
callJvmThreadpool/threadpool.cpp
callJvmThreadpool/threadpool.cpp
+19
-9
未找到文件。
callJvmThreadpool/.idea/inspectionProfiles/Project_Default.xml
0 → 100644
浏览文件 @
91c6495f
<component
name=
"InspectionProjectProfileManager"
>
<profile
version=
"1.0"
>
<option
name=
"myName"
value=
"Project Default"
/>
<inspection_tool
class=
"EndlessLoop"
enabled=
"false"
level=
"WARNING"
enabled_by_default=
"false"
/>
</profile>
</component>
\ No newline at end of file
callJvmThreadpool/.idea/vcs.xml
0 → 100644
浏览文件 @
91c6495f
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$/.."
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
callJvmThreadpool/.idea/workspace.xml
浏览文件 @
91c6495f
...
...
@@ -11,7 +11,9 @@
</configurations>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"599c0760-bab6-4b6f-b494-132266cf439a"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"599c0760-bab6-4b6f-b494-132266cf439a"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/threadpool.cpp"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/threadpool.cpp"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -23,8 +25,12 @@
<option
name=
"clangWarnings"
value=
"-Wno-unused-variable,-Werror=implicit-function-declaration,-Wshadow,-Wno-shadow-field-in-constructor-modified,-Wno-shadow-ivar,-Wno-writable-strings"
/>
</component>
<component
name=
"ExecutionTargetManager"
SELECTED_TARGET=
"CMakeBuildProfile:Debug"
/>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$/.."
/>
</component>
<component
name=
"OCFindUsagesOptions"
text=
"true"
ivars=
"false"
properties=
"true"
derivedClasses=
"false"
/>
<component
name=
"ProjectId"
id=
"1S3XdmemmsYpX6UWsvCHnYoMIbN"
/>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"PropertiesComponent"
>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
...
...
@@ -60,10 +66,22 @@
<updated>
1570793342779
</updated>
<workItem
from=
"1570793344392"
duration=
"1218000"
/>
<workItem
from=
"1570848279077"
duration=
"10800000"
/>
<workItem
from=
"1572923636254"
duration=
"280000"
/>
</task>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
<option
name=
"TAB_STATES"
>
<map>
<entry
key=
"MAIN"
>
<value>
<State
/>
</value>
</entry>
</map>
</option>
</component>
</project>
\ No newline at end of file
callJvmThreadpool/cmake-build-debug/CMakeFiles/main.dir/threadpool.cpp.o
浏览文件 @
91c6495f
无法预览此类型文件
callJvmThreadpool/cmake-build-debug/CMakeFiles/main.dir/tpool.cpp.o
浏览文件 @
91c6495f
无法预览此类型文件
callJvmThreadpool/cmake-build-debug/main
浏览文件 @
91c6495f
无法预览此类型文件
callJvmThreadpool/threadpool.cpp
浏览文件 @
91c6495f
...
...
@@ -134,7 +134,7 @@ void* handle_stream(void* args)
char
hello
[]
=
"Hello send"
;
send
(
client_fd
,
hello
,
strlen
(
hello
),
0
);
close
(
client_fd
);
}
void
*
jvmThreads
(
void
*
myJvm
,
char
*
plainsql
,
char
*
dbname
)
...
...
@@ -201,17 +201,28 @@ int main () {
}
int
new_socket
;
struct
ARGS
*
args
;
int
client_fd
,
new_socket
;
struct
sockaddr_in
address
;
int
addrlen
=
sizeof
(
address
);
client_fd
=
socket_init
();
int
i
=
0
;
while
(
1
){
new_socket
=
accept
(
client_fd
,
(
struct
sockaddr
*
)
&
address
,
(
socklen_t
*
)
&
addrlen
);
struct
ARGS
*
args
;
args
=
static_cast
<
ARGS
*>
(
malloc
(
sizeof
(
struct
args
*
)));
args
->
jvm
=
&
myJvm
;
args
->
socket
=
new_socket
;
tpool_add_work
(
handle_stream
,
args
);
}
new_socket
=
socket_init
();
args
=
static_cast
<
ARGS
*>
(
malloc
(
sizeof
(
struct
args
*
)));
args
->
jvm
=
&
myJvm
;
args
->
socket
=
new_socket
;
handle_stream
(
args
);
//
handle_stream(args);
// while (1)
// {
...
...
@@ -232,7 +243,6 @@ int main () {
sleep
(
2
);
close
(
new_socket
);
tpool_destroy
();
myJvm
.
jvm
->
DestroyJavaVM
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录