7 Commits

Author SHA1 Message Date
SilverFox b2e8b4ba15 Improve unittest and fix some leak (#366)
- Fix #353, SniHandlerTest timeout in net452 and netcoreapp2.1(preview).
- Fix that test for TlsHandlerTest.NoAutoReadHandshakeProgresses never finish in netcoreapp2.0 and 2.1(preview)
- Fix some leak on TlsHandler and EmbeddedChannel.
- Update xunit from 2.2.0 to 2.3.1. That greatly improve the test speed of DotNetty.Buffers.Tests in net452.
2018-03-07 07:28:40 -08:00
Max Gortman 0131fa9fe2 Porting adaptive read buffer prediction
Motivation:
Provides good flexible default while lowering memory consumption on average.

Modifications:
- Synced IRecvByteBufAllocator and relevant parts up to date
- Ported AdaptiveRecvByteBufAllocator
- Extra: properly porting ChannelMetadata

Result:
Process of receiving bytes from network is more configurable and allows for both more conservative and more agressive ingestion.
2016-05-31 17:55:07 -07:00
Max Gortman 8114b7fb21 Fixing minor issues and code style throughout
Motivation:
Modern language features provide for easier to read, more compact code.

Modifications:
- expression body for single line methods
- Extra: fixes in xml docs
- Extra: code style deviations in recent commits

Result:
Cleaner, more consistent code.
2016-05-13 12:18:04 -07:00
Max Gortman 47163fde8d switching to C# 6.0 2016-05-05 01:19:49 -07:00
Mikhail 30806f5eac Poll task from the queue. Hotfix 2016-04-14 18:14:43 -07:00
mgortman d5a4c30778 Adds IEventExecutor.Schedule, proper cancellation of scheduled tasks
Motivation:
Allow for less GC when scheduling if Task-based API is not required. Allow for proper cleanup when canceling scheduled task so that associated resources can be cleaned up early.

Modifications:
- Moved out scheduled task implementations from AbstractScheduledEventExecutor
- Introduced IScheduledTask and aligned IScheduledRunnable
- Implemented removal of scheduled task upon its cancellation
- Extra minor fixes
 - IByteBuffer.ToString(Encoding) honoring ArrayOffset
 - InternalLoggerFactory creating default logging factory lazily

Result:
Scheduled tasks that normally never fire (e.g. timeout handling) do not cause resources to be held up unnecessarily in memory for longer period of time if not necessary.
2016-04-05 19:17:46 -07:00
VIEWPOINT 5b1139ee07 Improved pooling of buffers when a buffer was released in other thread.
Motivation:

When buffer was released in other thread, this buffer couldn't be released. I think that need to release a buffer in other thread for memory effectiveness.

Modifications:

Implement WeakOrderQueue for releasing a buffer that other thread owned.

Result:

When buffer was released in othread thread, owned thread can use this buffer.
2016-02-22 07:51:31 +09:00