Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
366de877
Commit
366de877
authored
Sep 01, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Service: add `noexcept`
parent
d3cc54d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
Service.cxx
src/db/update/Service.cxx
+5
-5
Service.hxx
src/db/update/Service.hxx
+6
-6
No files found.
src/db/update/Service.cxx
View file @
366de877
...
...
@@ -41,7 +41,7 @@
UpdateService
::
UpdateService
(
const
ConfigData
&
_config
,
EventLoop
&
_loop
,
SimpleDatabase
&
_db
,
CompositeStorage
&
_storage
,
DatabaseListener
&
_listener
)
DatabaseListener
&
_listener
)
noexcept
:
config
(
_config
),
defer
(
_loop
,
BIND_THIS_METHOD
(
RunDeferred
)),
db
(
_db
),
storage
(
_storage
),
...
...
@@ -50,7 +50,7 @@ UpdateService::UpdateService(const ConfigData &_config,
{
}
UpdateService
::~
UpdateService
()
UpdateService
::~
UpdateService
()
noexcept
{
CancelAllAsync
();
...
...
@@ -59,7 +59,7 @@ UpdateService::~UpdateService()
}
void
UpdateService
::
CancelAllAsync
()
UpdateService
::
CancelAllAsync
()
noexcept
{
assert
(
GetEventLoop
().
IsInside
());
...
...
@@ -70,7 +70,7 @@ UpdateService::CancelAllAsync()
}
void
UpdateService
::
CancelMount
(
const
char
*
uri
)
UpdateService
::
CancelMount
(
const
char
*
uri
)
noexcept
{
/* determine which (mounted) database will be updated and what
storage will be scanned */
...
...
@@ -160,7 +160,7 @@ UpdateService::StartThread(UpdateQueueItem &&i)
}
unsigned
UpdateService
::
GenerateId
()
UpdateService
::
GenerateId
()
noexcept
{
unsigned
id
=
update_task_id
+
1
;
if
(
id
>
update_task_id_max
)
...
...
src/db/update/Service.hxx
View file @
366de877
...
...
@@ -64,9 +64,9 @@ public:
UpdateService
(
const
ConfigData
&
_config
,
EventLoop
&
_loop
,
SimpleDatabase
&
_db
,
CompositeStorage
&
_storage
,
DatabaseListener
&
_listener
);
DatabaseListener
&
_listener
)
noexcept
;
~
UpdateService
();
~
UpdateService
()
noexcept
;
auto
&
GetEventLoop
()
const
noexcept
{
return
defer
.
GetEventLoop
();
...
...
@@ -76,7 +76,7 @@ public:
* Returns a non-zero job id when we are currently updating
* the database.
*/
unsigned
GetId
()
const
{
unsigned
GetId
()
const
noexcept
{
return
next
.
id
;
}
...
...
@@ -96,14 +96,14 @@ public:
* Clear the queue and cancel the current update. Does not
* wait for the thread to exit.
*/
void
CancelAllAsync
();
void
CancelAllAsync
()
noexcept
;
/**
* Cancel all updates for the given mount point. If an update
* is already running for it, the method will wait for
* cancellation to complete.
*/
void
CancelMount
(
const
char
*
uri
);
void
CancelMount
(
const
char
*
uri
)
noexcept
;
private
:
/* DeferEvent callback */
...
...
@@ -114,7 +114,7 @@ private:
void
StartThread
(
UpdateQueueItem
&&
i
);
unsigned
GenerateId
();
unsigned
GenerateId
()
noexcept
;
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment