<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with tcpstream]]></title><description><![CDATA[A list of topics that have been tagged with tcpstream]]></description><link>http://community.bwbot.org/tags/tcpstream</link><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 01:48:51 GMT</lastBuildDate><atom:link href="http://community.bwbot.org/tags/tcpstream.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Mar 2021 06:44:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[rust使用中的坑]]></title><description><![CDATA[<ol>
<li>内存泄漏</li>
</ol>
<p dir="auto">由于程序中使用了正则表达式，而rust的正则表达式库依赖了一个线程库。这个线程库在使用中会内存泄漏。目前最新版本的正则表达式库已经移除了这个线程库依赖，不再有内存泄漏的问题。</p>
<p dir="auto">所以虽然rust本身是内存安全的，但是内存泄漏的情况还是会发生。rust目前还是比较新，比较重要的库还不是很稳定。</p>
<ol start="2">
<li>同样的程序在不同系统中表现不一样</li>
</ol>
<p dir="auto">虽然rust本身是可以平台编译使用的，但是具体的函数库在不同平台上的表现并不完全一致。如TcpStream的Shutdown方法。如果使用阻塞的TcpStream。Shutdown方法在windows和Ubuntu 20.04上都工作正常，但是在Ubuntu16.04上却可能会阻塞。这是由于Shutdown只是对系统的shutdown函数进行了封装调用，具体的表现就和系统的shutdown相关，而不同系统的shutdown表现并不一致。</p>
]]></description><link>http://community.bwbot.org/topic/3019/rust使用中的坑</link><guid isPermaLink="true">http://community.bwbot.org/topic/3019/rust使用中的坑</guid><dc:creator><![CDATA[weijiz]]></dc:creator><pubDate>Sat, 20 Mar 2021 06:44:09 GMT</pubDate></item></channel></rss>